Class TableMeta<T extends TopiaEntityEnum>
java.lang.Object
org.nuiton.topia.persistence.metadata.TableMeta<T>
- All Implemented Interfaces:
java.io.Serializable,java.lang.Iterable<ColumnMeta>,MetaFilenameAware<T>
public class TableMeta<T extends TopiaEntityEnum> extends java.lang.Object implements java.io.Serializable, java.lang.Iterable<ColumnMeta>, MetaFilenameAware<T>
Define metas of a given db table.
- Since:
- 2.6.12
- Author:
- tchemit <chemit@codelutin.com>
- See Also:
- Serialized Form
-
Field Summary
Fields Modifier and Type Field Description protected java.util.List<AssociationMeta<T>>associationsList of associations of the entity.protected org.nuiton.util.beans.Binder<TopiaEntity,TopiaEntity>binderBinder used to copy entities (lazy loaded).protected java.util.List<ColumnMeta>columnsList of columns of the entity.protected java.util.Set<T>dependenciesList of dependencies (says all property with a topiaentity type)protected EntityOperator<TopiaEntity>operatorEntity operator used in generic algorithms.protected TsourceType of the entity.protected booleanuseNaturalIdsOrNotNullsFields inherited from interface org.nuiton.topia.persistence.metadata.MetaFilenameAware
CSV_EXTENSION -
Constructor Summary
Constructors Modifier Constructor Description protectedTableMeta(T source, TopiaPersistenceHelper<T> typeProvider) -
Method Summary
Modifier and Type Method Description voidcopy(TopiaEntity source, TopiaEntity target)java.util.List<AssociationMeta<T>>getAssociations()AssociationMeta<T>getAssociations(java.lang.String name)protected org.nuiton.util.beans.Binder<TopiaEntity,TopiaEntity>getBinder()java.util.List<java.lang.String>getColumnNames()java.lang.String[]getColumnNamesAsArray()java.util.List<ColumnMeta>getColumns()ColumnMetagetColumns(java.lang.String columnName)java.util.Set<T>getDependencies()java.lang.Class<? extends TopiaEntity>getEntityType()java.lang.StringgetFilename()java.lang.StringgetName()EntityOperator<TopiaEntity>getOperator()TgetSource()java.util.Iterator<ColumnMeta>iterator()TopiaEntitynewEntity()java.io.FilenewFile(java.io.File container)static <T extends TopiaEntityEnum>
TableMeta<T>newMeta(T entityEnum, TopiaPersistenceHelper<T> typeProvider)java.io.WriternewWriter(java.io.File container)java.util.Map<java.lang.String,java.lang.Object>prepareCreate(TopiaEntity bean, java.lang.String topiaId)java.lang.StringtoString()
-
Field Details
-
source
Type of the entity. -
columns
List of columns of the entity. -
dependencies
List of dependencies (says all property with a topiaentity type) -
associations
List of associations of the entity. -
binder
Binder used to copy entities (lazy loaded). -
operator
Entity operator used in generic algorithms. -
useNaturalIdsOrNotNulls
protected boolean useNaturalIdsOrNotNulls
-
-
Constructor Details
-
Method Details
-
newMeta
public static <T extends TopiaEntityEnum> TableMeta<T> newMeta(T entityEnum, TopiaPersistenceHelper<T> typeProvider) -
getSource
- Specified by:
getSourcein interfaceMetaFilenameAware<T extends TopiaEntityEnum>
-
getName
public java.lang.String getName()- Specified by:
getNamein interfaceMetaFilenameAware<T extends TopiaEntityEnum>
-
getFilename
public java.lang.String getFilename()- Specified by:
getFilenamein interfaceMetaFilenameAware<T extends TopiaEntityEnum>
-
newFile
public java.io.File newFile(java.io.File container)- Specified by:
newFilein interfaceMetaFilenameAware<T extends TopiaEntityEnum>
-
newWriter
public java.io.Writer newWriter(java.io.File container)- Specified by:
newWriterin interfaceMetaFilenameAware<T extends TopiaEntityEnum>
-
toString
public java.lang.String toString()- Overrides:
toStringin classjava.lang.Object
-
getEntityType
-
getColumns
-
getColumnNamesAsArray
public java.lang.String[] getColumnNamesAsArray() -
getColumnNames
public java.util.List<java.lang.String> getColumnNames() -
getColumns
-
getAssociations
-
getDependencies
-
getAssociations
-
copy
-
prepareCreate
public java.util.Map<java.lang.String,java.lang.Object> prepareCreate(TopiaEntity bean, java.lang.String topiaId) -
iterator
- Specified by:
iteratorin interfacejava.lang.Iterable<T extends TopiaEntityEnum>
-
newEntity
-
getBinder
-
getOperator
-