Class YTypeSystemSchemaMapping
- java.lang.Object
-
- de.hybris.platform.util.typesystem.YTypeSystemSchemaMapping
-
public class YTypeSystemSchemaMapping extends java.lang.ObjectMapping of a type system to a database schema.
-
-
Constructor Summary
Constructors Constructor Description YTypeSystemSchemaMapping(YTypeSystem system, DBSchema schema)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidassertSchema(DBColumn col)protected voidassertSystem(YAttributeDeployment depl)protected voidassertSystem(YDeployment depl)voidassignColumn(YDeployment deployment, YAttributeDeployment ad, DBColumn column)Assigns a attribute deployment to a certain column.DBColumngetColumn(YAttributeDescriptor ad)Retrieves the mapped column for a given attribute.DBColumngetColumn(YDeployment deployment, YAttributeDeployment ad)Retrieves the mapped column for a given attribute deployment within a item deployment.java.util.Map<YAttributeDeployment,DBColumn>getColumns(YDeployment depl)Returns all mapped attributes for a given item deployment.DBSchemagetSchema()YTypeSystemgetSystem()
-
-
-
Constructor Detail
-
YTypeSystemSchemaMapping
public YTypeSystemSchemaMapping(YTypeSystem system, DBSchema schema)
-
-
Method Detail
-
getSystem
public YTypeSystem getSystem()
-
getSchema
public DBSchema getSchema()
-
assertSchema
protected void assertSchema(DBColumn col)
-
assertSystem
protected void assertSystem(YAttributeDeployment depl)
-
assertSystem
protected void assertSystem(YDeployment depl)
-
assignColumn
public void assignColumn(YDeployment deployment, YAttributeDeployment ad, DBColumn column)
Assigns a attribute deployment to a certain column.- Parameters:
deployment- the actual deployment which the attribute is assigned for (may be multiple per attribute due to inheritance)ad- the attribute deployment to assigncolumn- the column to assign to- Throws:
java.lang.IllegalArgumentException- if the attribute has been assigned before to a different column within the same deployment
-
getColumn
public DBColumn getColumn(YAttributeDescriptor ad)
Retrieves the mapped column for a given attribute.- Parameters:
ad- the attribute desciriptor to get the mapped column for- Returns:
- the column or null if the attribute has not been mapped
-
getColumn
public DBColumn getColumn(YDeployment deployment, YAttributeDeployment ad)
Retrieves the mapped column for a given attribute deployment within a item deployment.- Parameters:
deployment- the item deployment to find mapped column withinad- the attribute deployment to get column for- Returns:
- the column or null if the attribute has not been mapped
-
getColumns
public java.util.Map<YAttributeDeployment,DBColumn> getColumns(YDeployment depl)
Returns all mapped attributes for a given item deployment.- Parameters:
depl- the item deployment
-
-