Class Entity

    • Method Detail

      • addIdProperty

        public Property.PropertyBuilder addIdProperty()
        Adds a standard _id column required by standard Android classes, e.g. list adapters.
      • addToMany

        public ToMany addToMany​(Entity target,
                                Property targetProperty)
        Adds a to-many relationship; the target entity is joined to the PK property of this entity (typically the ID).
      • addToMany

        public ToMany addToMany​(Property sourceProperty,
                                Entity target,
                                Property targetProperty)
        Add a to-many relationship; the target entity is joined using the given target property (of the target entity) and given source property (of this entity).
      • addToOne

        public ToOne addToOne​(Entity target,
                              Property fkProperty)
        Adds a to-one relationship to the given target entity using the given given foreign key property (which belongs to this entity).
      • addToOneWithoutProperty

        public ToOne addToOneWithoutProperty​(java.lang.String name,
                                             Entity target,
                                             java.lang.String fkColumnName)
      • addToOneWithoutProperty

        public ToOne addToOneWithoutProperty​(java.lang.String name,
                                             Entity target,
                                             java.lang.String fkColumnName,
                                             boolean notNull,
                                             boolean unique)
      • addIncomingToMany

        protected void addIncomingToMany​(ToMany toMany)
      • addIndex

        public Entity addIndex​(Index index)
        Adds a new index to the entity.
      • addImport

        public Entity addImport​(java.lang.String additionalImport)
      • isProtobuf

        public boolean isProtobuf()
      • getSchema

        public Schema getSchema()
      • getDbName

        public java.lang.String getDbName()
      • setTableName

        @Deprecated
        public void setTableName​(java.lang.String tableName)
        Deprecated.
      • setDbName

        public void setDbName​(java.lang.String dbName)
      • getClassName

        public java.lang.String getClassName()
      • getProperties

        public java.util.List<Property> getProperties()
      • getPropertiesColumns

        public java.util.List<Property> getPropertiesColumns()
      • getJavaPackage

        public java.lang.String getJavaPackage()
      • setJavaPackage

        public void setJavaPackage​(java.lang.String javaPackage)
      • getJavaPackageDao

        public java.lang.String getJavaPackageDao()
      • setJavaPackageDao

        public void setJavaPackageDao​(java.lang.String javaPackageDao)
      • getClassNameDao

        public java.lang.String getClassNameDao()
      • setClassNameDao

        public void setClassNameDao​(java.lang.String classNameDao)
      • getClassNameTest

        public java.lang.String getClassNameTest()
      • setClassNameTest

        public void setClassNameTest​(java.lang.String classNameTest)
      • getJavaPackageTest

        public java.lang.String getJavaPackageTest()
      • setJavaPackageTest

        public void setJavaPackageTest​(java.lang.String javaPackageTest)
      • getPropertiesPk

        public java.util.List<Property> getPropertiesPk()
        Internal property used by templates, don't use during entity definition.
      • getPropertiesNonPk

        public java.util.List<Property> getPropertiesNonPk()
        Internal property used by templates, don't use during entity definition.
      • getPkProperty

        public Property getPkProperty()
        Internal property used by templates, don't use during entity definition.
      • getIndexes

        public java.util.List<Index> getIndexes()
      • getPkType

        public java.lang.String getPkType()
        Internal property used by templates, don't use during entity definition.
      • isConstructors

        public boolean isConstructors()
      • setConstructors

        public void setConstructors​(boolean constructors)
        Flag to define if constructors should be generated.
      • isSkipGeneration

        public boolean isSkipGeneration()
      • setSkipGeneration

        public void setSkipGeneration​(boolean skipGeneration)
        Flag if the entity's code generation should be skipped. E.g. if you need to change the class after initial generation.
      • setSkipTableCreation

        @Deprecated
        public void setSkipTableCreation​(boolean skipTableCreation)
        Deprecated.
      • setSkipCreationInDb

        public void setSkipCreationInDb​(boolean skipCreationInDb)
        Flag if CREATE and DROP TABLE scripts should be skipped in Dao.
      • isSkipCreationInDb

        public boolean isSkipCreationInDb()
      • isSkipGenerationTest

        public boolean isSkipGenerationTest()
      • setSkipGenerationTest

        public void setSkipGenerationTest​(boolean skipGenerationTest)
      • getToOneRelations

        public java.util.List<ToOne> getToOneRelations()
      • getToManyRelations

        public java.util.List<ToManyBase> getToManyRelations()
      • getIncomingToManyRelations

        public java.util.List<ToManyBase> getIncomingToManyRelations()
      • setActive

        public void setActive​(java.lang.Boolean active)
        Entities with relations are active, but this method allows to make the entities active even if it does not have relations.
      • getActive

        public java.lang.Boolean getActive()
      • getHasKeepSections

        public java.lang.Boolean getHasKeepSections()
      • getAdditionalImportsEntity

        public java.util.Collection<java.lang.String> getAdditionalImportsEntity()
      • getAdditionalImportsDao

        public java.util.Collection<java.lang.String> getAdditionalImportsDao()
      • setHasKeepSections

        public void setHasKeepSections​(java.lang.Boolean hasKeepSections)
      • getInterfacesToImplement

        public java.util.List<java.lang.String> getInterfacesToImplement()
      • getContentProviders

        public java.util.List<ContentProvider> getContentProviders()
      • implementsInterface

        public void implementsInterface​(java.lang.String... interfaces)
      • implementsSerializable

        public void implementsSerializable()
      • getSuperclass

        public java.lang.String getSuperclass()
      • setSuperclass

        public void setSuperclass​(java.lang.String classToExtend)
      • getJavaDoc

        public java.lang.String getJavaDoc()
      • setJavaDoc

        public void setJavaDoc​(java.lang.String javaDoc)
      • getCodeBeforeClass

        public java.lang.String getCodeBeforeClass()
      • setCodeBeforeClass

        public void setCodeBeforeClass​(java.lang.String codeBeforeClass)
      • init2ndPassNamesWithDefaults

        protected void init2ndPassNamesWithDefaults()
      • init2ndPassIndexNamesWithDefaults

        protected void init2ndPassIndexNamesWithDefaults()
      • validatePropertyExists

        public void validatePropertyExists​(Property property)
      • getMultiIndexes

        public java.util.List<Index> getMultiIndexes()
      • isNonDefaultDbName

        public boolean isNonDefaultDbName()
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object