
package io.objectbox.tree;

import io.objectbox.EntityInfo;
import io.objectbox.annotation.apihint.Internal;
import io.objectbox.internal.CursorFactory;
import io.objectbox.internal.IdGetter;
import io.objectbox.internal.ToOneGetter;
import io.objectbox.relation.RelationInfo;
import io.objectbox.relation.ToOne;

// THIS CODE IS GENERATED BY ObjectBox, DO NOT EDIT.

/**
 * Properties for entity "MetaLeaf". Can be used for QueryBuilder and for referencing DB names.
 */
public final class MetaLeaf_ implements EntityInfo<MetaLeaf> {

    // Leading underscores for static constants to avoid naming conflicts with property names

    public static final String __ENTITY_NAME = "MetaLeaf";

    public static final int __ENTITY_ID = 47;

    public static final Class<MetaLeaf> __ENTITY_CLASS = MetaLeaf.class;

    public static final String __DB_NAME = "MetaLeaf";

    public static final CursorFactory<MetaLeaf> __CURSOR_FACTORY = new MetaLeafCursor.Factory();

    @Internal
    static final MetaLeafIdGetter __ID_GETTER = new MetaLeafIdGetter();

    public final static MetaLeaf_ __INSTANCE = new MetaLeaf_();

    public final static io.objectbox.Property<MetaLeaf> id =
        new io.objectbox.Property<>(__INSTANCE, 0, 1, long.class, "id", true, "id");

    public final static io.objectbox.Property<MetaLeaf> name =
        new io.objectbox.Property<>(__INSTANCE, 1, 2, String.class, "name");

    public final static io.objectbox.Property<MetaLeaf> description =
        new io.objectbox.Property<>(__INSTANCE, 2, 3, String.class, "description");

    public final static io.objectbox.Property<MetaLeaf> flags =
        new io.objectbox.Property<>(__INSTANCE, 3, 4, int.class, "flags");

    public final static io.objectbox.Property<MetaLeaf> valueType =
        new io.objectbox.Property<>(__INSTANCE, 4, 5, short.class, "valueType");

    public final static io.objectbox.Property<MetaLeaf> valueEnum =
        new io.objectbox.Property<>(__INSTANCE, 5, 6, String[].class, "valueEnum");

    public final static io.objectbox.Property<MetaLeaf> valueUnit =
        new io.objectbox.Property<>(__INSTANCE, 6, 7, String.class, "valueUnit");

    public final static io.objectbox.Property<MetaLeaf> valueMin =
        new io.objectbox.Property<>(__INSTANCE, 7, 8, String.class, "valueMin");

    public final static io.objectbox.Property<MetaLeaf> valueMax =
        new io.objectbox.Property<>(__INSTANCE, 8, 9, String.class, "valueMax");

    public final static io.objectbox.Property<MetaLeaf> branchId =
        new io.objectbox.Property<>(__INSTANCE, 9, 10, long.class, "branchId", true);

    @SuppressWarnings("unchecked")
    public final static io.objectbox.Property<MetaLeaf>[] __ALL_PROPERTIES = new io.objectbox.Property[]{
        id,
        name,
        description,
        flags,
        valueType,
        valueEnum,
        valueUnit,
        valueMin,
        valueMax,
        branchId
    };

    public final static io.objectbox.Property<MetaLeaf> __ID_PROPERTY = id;

    @Override
    public String getEntityName() {
        return __ENTITY_NAME;
    }

    @Override
    public int getEntityId() {
        return __ENTITY_ID;
    }

    @Override
    public Class<MetaLeaf> getEntityClass() {
        return __ENTITY_CLASS;
    }

    @Override
    public String getDbName() {
        return __DB_NAME;
    }

    @Override
    public io.objectbox.Property<MetaLeaf>[] getAllProperties() {
        return __ALL_PROPERTIES;
    }

    @Override
    public io.objectbox.Property<MetaLeaf> getIdProperty() {
        return __ID_PROPERTY;
    }

    @Override
    public IdGetter<MetaLeaf> getIdGetter() {
        return __ID_GETTER;
    }

    @Override
    public CursorFactory<MetaLeaf> getCursorFactory() {
        return __CURSOR_FACTORY;
    }

    @Internal
    static final class MetaLeafIdGetter implements IdGetter<MetaLeaf> {
        @Override
        public long getId(MetaLeaf object) {
            return object.getId();
        }
    }

    /** To-one relation "branch" to target entity "MetaBranch". */
    public static final RelationInfo<MetaLeaf, MetaBranch> branch =
            new RelationInfo<>(MetaLeaf_.__INSTANCE, MetaBranch_.__INSTANCE, branchId, new ToOneGetter<MetaLeaf, MetaBranch>() {
                @Override
                public ToOne<MetaBranch> getToOne(MetaLeaf entity) {
                    return entity.branch;
                }
            });

}
