/** * PUBLIC: * Specify the table name for the class of objects the receiver describes. * If the table has a qualifier it should be specified using the dot notation, * (i.e. "userid.employee"). This method is used for single table. */ public void setTableName(String tableName) throws DescriptorException { super.setTableName(tableName); }
/** * PUBLIC: * Specify the table name for the class of objects the receiver describes. * If the table has a qualifier it should be specified using the dot notation, * (i.e. "userid.employee"). This method is used for single table. */ public void setTableName(String tableName) throws DescriptorException { super.setTableName(tableName); }
/** * PUBLIC: * Specify the table name for the class of objects the receiver describes. * If the table has a qualifier it should be specified using the dot notation, * (i.e. "userid.employee"). This method is used for single table. */ public void setTableName(String tableName) throws DescriptorException { super.setTableName(tableName); }
/** * @param clazzDescriptor */ protected void iconizeTableName(final ClassDescriptor clazzDescriptor, final Session session) { final String alias = clazzDescriptor.getAlias(); final String tableName = NameUtils.camelCaseToUnderscore(alias); LogSupport.logFine(session, "Set Tablename to {0}", tableName); clazzDescriptor.setTableName(tableName); }
public void customize(Session session) throws SQLException { ... for (ClassDescriptor descriptor : session.getDescriptors().values()) { if (!descriptor.getTables().isEmpty() && descriptor.getAlias().equalsIgnoreCase(descriptor.getTableName())) { tableName = TABLE_PREFIX + clazz.getSimpleName(); descriptor.setTableName(tableName); } }
descriptor.setTableName(tableName); for (IndexDefinition index : descriptor.getTables().get(0).getIndexes()) { index.setTargetTable(tableName);
@Override public void customize(Session session) throws SQLException { for (ClassDescriptor descriptor : session.getDescriptors().values()) { // Only change the table name for non-embedable entities with no // @Table already if (!descriptor.getTables().isEmpty() && descriptor.getAlias().equalsIgnoreCase(descriptor.getTableName())) { String tableName = addUnderscores(descriptor.getTableName()); descriptor.setTableName(tableName); for (IndexDefinition index : descriptor.getTables().get(0).getIndexes()) { index.setTargetTable(tableName); } } for (DatabaseMapping mapping : descriptor.getMappings()) { // Only change the column name for non-embedable entities with // no @Column already if (mapping.getField() != null && !mapping.getAttributeName().isEmpty() && mapping.getField().getName().equalsIgnoreCase(mapping.getAttributeName())) { mapping.getField().setName(addUnderscores(mapping.getAttributeName())); } } } }
descriptor.setTableName(tableName); for (IndexDefinition index : descriptor.getTables().get(0).getIndexes()) { index.setTargetTable(tableName);