/** * Constructor, taking the meta data for the field, and the table it is mapped to. * * @param mmd MetaData for the field. * @param table Table definition */ public RDBMSStoreData(AbstractMemberMetaData mmd, Table table) { super(mmd.getFullFieldName(), mmd, SCO_TYPE, null); if (table == null) { throw new NullPointerException("table should not be null"); } this.table = table; this.tableName = table.toString(); this.tableOwner = true; this.tableIdentifier = table.getIdentifier(); String interfaceName = (table.getStoreManager().getMetaDataManager().isPersistentInterface(mmd.getType().getName()) ? mmd.getType().getName() : null); if (interfaceName != null) { this.interfaceName = interfaceName; } }
/** * Constructor for FCO data. * * @param cmd MetaData for the class. * @param table Table where the class is stored. * @param tableOwner Whether the class is the owner of the table. */ public RDBMSStoreData(ClassMetaData cmd, Table table, boolean tableOwner) { super(cmd.getFullClassName(), cmd, FCO_TYPE, null); this.tableOwner = tableOwner; if (table != null) { this.table = table; this.tableName = table.toString(); this.tableIdentifier = table.getIdentifier(); } String interfaces = null; ImplementsMetaData[] implMds = cmd.getImplementsMetaData(); if (implMds != null) { for (int i = 0; i < cmd.getImplementsMetaData().length; i++) { if (interfaces == null) { interfaces = ""; } else { interfaces += ","; } interfaces += cmd.getImplementsMetaData()[i].getName(); } this.interfaceName = interfaces; } }