Class YTypeSystemSchemaMapping

java.lang.Object
de.hybris.platform.util.typesystem.YTypeSystemSchemaMapping

public class YTypeSystemSchemaMapping extends Object
Mapping of a type system to a database schema.
  • Constructor Details

    • YTypeSystemSchemaMapping

      public YTypeSystemSchemaMapping(YTypeSystem system, DBSchema schema)
  • Method Details

    • 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 assign
      column - the column to assign to
      Throws:
      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 within
      ad - the attribute deployment to get column for
      Returns:
      the column or null if the attribute has not been mapped
    • getColumns

      public Map<YAttributeDeployment,DBColumn> getColumns(YDeployment depl)
      Returns all mapped attributes for a given item deployment.
      Parameters:
      depl - the item deployment