Package de.hybris.bootstrap.ddl
Class DatabaseModelGenerator
java.lang.Object
de.hybris.bootstrap.ddl.DatabaseModelGenerator
Responsible for creating in memory DB Model. This class creates a table each for all non abstract Items that re read
from YTypeSystem. Attributes and indices are included recursively.GenericItem is the first nonabstract Item in the
chain that has deployment. In this case a new table will be created with all the attributes of super types. For the
next nonabstract item i.e Product another table named Products will be generated which contains attributes of
Product(code,name, unit,description) + attributes of super types(i.e createdTime, modifiedTime pk etc). In case of
non abstract items that are not having an own deployment,parent deployment will be used. i.e Attributes of TestItem
(name, description) will be added to table genericitems.
-
Constructor Summary
ConstructorsConstructorDescriptionDatabaseModelGenerator(YTypeSystem typeSystem, DatabaseSettings databaseSettings, DbTypeSystem dbTypeSystem, PlatformConfig platformConfig, String tenantId) DatabaseModelGenerator(YTypeSystem typeSystem, DatabaseSettings databaseSettings, DbTypeSystem dbTypeSystem, PlatformConfig platformConfig, String tenantId, PropertiesLoader properties) -
Method Summary
Modifier and TypeMethodDescriptionprotected booleancanReuseExistingColumnForAttribute(YColumn existingColumn, YAttributeDescriptor attributeDescriptor, YTable targetTable) protected voidCreates system tables which are outside type systemprotected Stringprotected Stringprotected Stringprotected Stringprotected Stringprotected Stringprotected Stringprotected JdbcType
-
Constructor Details
-
DatabaseModelGenerator
public DatabaseModelGenerator(YTypeSystem typeSystem, DatabaseSettings databaseSettings, DbTypeSystem dbTypeSystem, PlatformConfig platformConfig, String tenantId, PropertiesLoader properties) -
DatabaseModelGenerator
public DatabaseModelGenerator(YTypeSystem typeSystem, DatabaseSettings databaseSettings, DbTypeSystem dbTypeSystem, PlatformConfig platformConfig, String tenantId)
-
-
Method Details
-
createDatabaseModel
-
canReuseExistingColumnForAttribute
protected boolean canReuseExistingColumnForAttribute(YColumn existingColumn, YAttributeDescriptor attributeDescriptor, YTable targetTable) -
getPersistenceTypeForJavaType
-
getCustomPersistenceType
-
getDefaultPersistenceJavaType
-
getCustomPersistenceTypeFromAttribute
-
getCustomPersistenceTypeFromAttributeDeployment
-
getPersistenceJavaTypeFromAttributeDeployment
-
getDefaultUnlocalizedColumnPersistenceJavaType
-
getDefaulLocalizedColumnPersistenceJavaType
-
createSystemTables
protected void createSystemTables()Creates system tables which are outside type system
-