Class YTypeSystemSchemaMapping


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

      • YTypeSystemSchemaMapping

        public YTypeSystemSchemaMapping​(YTypeSystem system,
                                        DBSchema schema)
    • Method Detail

      • getSchema

        public DBSchema getSchema()
      • assertSchema

        protected void assertSchema​(DBColumn col)
      • 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:
        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 within
        ad - 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