private void manageIncrementGenerator(Mappings mappings, Table tab, SimpleValue id, String entityName) { id.setIdentifierGeneratorStrategy("increment"); Properties params = new Properties(); params.put(PersistentIdentifierGenerator.IDENTIFIER_NORMALIZER, mappings.getObjectNameNormalizer()); params.setProperty(PersistentIdentifierGenerator.SCHEMA, quoteIdentifier(tab.getSchema())); params.put(IncrementGenerator.ENTITY_NAME, entityName); id.setIdentifierGeneratorProperties(params); id.setNullValue(null); }
private void manageIncrementGenerator(Mappings mappings, Table tab, SimpleValue id, String entityName) { id.setIdentifierGeneratorStrategy("increment"); Properties params = new Properties(); params.put(PersistentIdentifierGenerator.IDENTIFIER_NORMALIZER, mappings.getObjectNameNormalizer()); params.setProperty(PersistentIdentifierGenerator.SCHEMA, quoteIdentifier(tab.getSchema())); params.put(IncrementGenerator.ENTITY_NAME, entityName); id.setIdentifierGeneratorProperties(params); id.setNullValue(null); }
private void manageIdentityGenerator(Mappings mappings, Table tab, SimpleValue id) { id.setIdentifierGeneratorStrategy(PortofinoIdentityGenerator.class.getName()); //"identity"); Properties params = new Properties(); params.put(PersistentIdentifierGenerator.IDENTIFIER_NORMALIZER, mappings.getObjectNameNormalizer()); if (mappings.getSchemaName() != null) { params.setProperty( PersistentIdentifierGenerator.SCHEMA, mappings.getObjectNameNormalizer().normalizeIdentifierQuoting(mappings.getSchemaName())); } if (mappings.getCatalogName() != null) { params.setProperty( PersistentIdentifierGenerator.CATALOG, mappings.getObjectNameNormalizer().normalizeIdentifierQuoting(mappings.getCatalogName())); } id.setIdentifierGeneratorProperties(params); id.setNullValue(null); }
private void manageIdentityGenerator(Mappings mappings, Table tab, SimpleValue id) { id.setIdentifierGeneratorStrategy(PortofinoIdentityGenerator.class.getName()); //"identity"); Properties params = new Properties(); params.put(PersistentIdentifierGenerator.IDENTIFIER_NORMALIZER, mappings.getObjectNameNormalizer()); if (mappings.getSchemaName() != null) { params.setProperty( PersistentIdentifierGenerator.SCHEMA, mappings.getObjectNameNormalizer().normalizeIdentifierQuoting(mappings.getSchemaName())); } if (mappings.getCatalogName() != null) { params.setProperty( PersistentIdentifierGenerator.CATALOG, mappings.getObjectNameNormalizer().normalizeIdentifierQuoting(mappings.getCatalogName())); } id.setIdentifierGeneratorProperties(params); id.setNullValue(null); }
private void manageSequenceGenerator(Mappings mappings, Table tab, SimpleValue id, SequenceGenerator generator) { id.setIdentifierGeneratorStrategy ("enhanced-sequence"); Properties params = new Properties(); params.put(PersistentIdentifierGenerator.IDENTIFIER_NORMALIZER, mappings.getObjectNameNormalizer()); params.put(SequenceStyleGenerator.SEQUENCE_PARAM, quoteIdentifier(generator.getName())); params.setProperty( SequenceStyleGenerator.SCHEMA, quoteIdentifier(tab.getSchema())); id.setIdentifierGeneratorProperties(params); id.setNullValue(null); }
private void manageSequenceGenerator(Mappings mappings, Table tab, SimpleValue id, SequenceGenerator generator) { id.setIdentifierGeneratorStrategy ("enhanced-sequence"); Properties params = new Properties(); params.put(PersistentIdentifierGenerator.IDENTIFIER_NORMALIZER, mappings.getObjectNameNormalizer()); params.put(SequenceStyleGenerator.SEQUENCE_PARAM, quoteIdentifier(generator.getName())); params.setProperty( SequenceStyleGenerator.SCHEMA, quoteIdentifier(tab.getSchema())); id.setIdentifierGeneratorProperties(params); id.setNullValue(null); }
private void manageTableGenerator(Mappings mappings, Table tab, SimpleValue id, com.manydesigns.portofino.model.database.TableGenerator generator) { id.setIdentifierGeneratorStrategy("enhanced-table"); Properties params = new Properties(); params.put(TableGenerator.TABLE, tab); params.put(TableGenerator.TABLE_PARAM, quoteIdentifier(generator.getTable())); params.put(PersistentIdentifierGenerator.IDENTIFIER_NORMALIZER, mappings.getObjectNameNormalizer()); params.put(TableGenerator.SEGMENT_COLUMN_PARAM, quoteIdentifier(generator.getKeyColumn())); params.put(TableGenerator.SEGMENT_VALUE_PARAM, generator.getKeyValue()); params.put(TableGenerator.VALUE_COLUMN_PARAM, quoteIdentifier(generator.getValueColumn())); params.setProperty( TableGenerator.SCHEMA, quoteIdentifier(tab.getSchema())); id.setIdentifierGeneratorProperties(params); id.setNullValue(null); }
private void manageTableGenerator(Mappings mappings, Table tab, SimpleValue id, com.manydesigns.portofino.model.database.TableGenerator generator) { id.setIdentifierGeneratorStrategy("enhanced-table"); Properties params = new Properties(); params.put(TableGenerator.TABLE, tab); params.put(TableGenerator.TABLE_PARAM, quoteIdentifier(generator.getTable())); params.put(PersistentIdentifierGenerator.IDENTIFIER_NORMALIZER, mappings.getObjectNameNormalizer()); params.put(TableGenerator.SEGMENT_COLUMN_PARAM, quoteIdentifier(generator.getKeyColumn())); params.put(TableGenerator.SEGMENT_VALUE_PARAM, generator.getKeyValue()); params.put(TableGenerator.VALUE_COLUMN_PARAM, quoteIdentifier(generator.getValueColumn())); params.setProperty( TableGenerator.SCHEMA, quoteIdentifier(tab.getSchema())); id.setIdentifierGeneratorProperties(params); id.setNullValue(null); }
public void redefineColumnName(String columnName, String propertyName, boolean applyNamingStrategy) { if ( applyNamingStrategy ) { if ( StringHelper.isEmpty( columnName ) ) { if ( propertyName != null ) { mappingColumn.setName( mappings.getObjectNameNormalizer().normalizeIdentifierQuoting( mappings.getNamingStrategy().propertyToColumnName( propertyName ) ) ); } //Do nothing otherwise } else { columnName = mappings.getObjectNameNormalizer().normalizeIdentifierQuoting( columnName ); columnName = mappings.getNamingStrategy().columnName( columnName ); columnName = mappings.getObjectNameNormalizer().normalizeIdentifierQuoting( columnName ); mappingColumn.setName( columnName ); } } else { if ( StringHelper.isNotEmpty( columnName ) ) { mappingColumn.setName( mappings.getObjectNameNormalizer().normalizeIdentifierQuoting( columnName ) ); } } }
public void redefineColumnName(String columnName, String propertyName, boolean applyNamingStrategy) { if ( applyNamingStrategy ) { if ( StringHelper.isEmpty( columnName ) ) { if ( propertyName != null ) { mappingColumn.setName( mappings.getObjectNameNormalizer().normalizeIdentifierQuoting( mappings.getNamingStrategy().propertyToColumnName( propertyName ) ) ); } //Do nothing otherwise } else { columnName = mappings.getObjectNameNormalizer().normalizeIdentifierQuoting( columnName ); columnName = mappings.getNamingStrategy().columnName( columnName ); columnName = mappings.getObjectNameNormalizer().normalizeIdentifierQuoting( columnName ); mappingColumn.setName( columnName ); } } else { if ( StringHelper.isNotEmpty( columnName ) ) { mappingColumn.setName( mappings.getObjectNameNormalizer().normalizeIdentifierQuoting( columnName ) ); } } }
params.put( PersistentIdentifierGenerator.IDENTIFIER_NORMALIZER, mappings.getObjectNameNormalizer() );
params.put( PersistentIdentifierGenerator.IDENTIFIER_NORMALIZER, mappings.getObjectNameNormalizer() ); mappings.getObjectNameNormalizer().normalizeIdentifierQuoting( mappings.getSchemaName() ) ); params.setProperty( PersistentIdentifierGenerator.CATALOG, mappings.getObjectNameNormalizer().normalizeIdentifierQuoting( mappings.getCatalogName() ) );
params.put( PersistentIdentifierGenerator.IDENTIFIER_NORMALIZER, mappings.getObjectNameNormalizer() );
params.put( PersistentIdentifierGenerator.IDENTIFIER_NORMALIZER, mappings.getObjectNameNormalizer() ); mappings.getObjectNameNormalizer().normalizeIdentifierQuoting( mappings.getSchemaName() ) ); params.setProperty( PersistentIdentifierGenerator.CATALOG, mappings.getObjectNameNormalizer().normalizeIdentifierQuoting( mappings.getCatalogName() ) );
: mappings.getObjectNameNormalizer().normalizeIdentifierQuoting( columnDefinition ); String name = "".equals( colName ) ? defaultName : colName; name = mappings.getObjectNameNormalizer().normalizeIdentifierQuoting( name ); return new Ejb3JoinColumn( sqlType, defaultName = mappings.getObjectNameNormalizer().normalizeIdentifierQuoting( defaultName ); return new Ejb3JoinColumn( (String) null, defaultName,
: mappings.getObjectNameNormalizer().normalizeIdentifierQuoting( columnDefinition ); String name = "".equals( colName ) ? defaultName : colName; name = mappings.getObjectNameNormalizer().normalizeIdentifierQuoting( name ); return new Ejb3JoinColumn( sqlType, defaultName = mappings.getObjectNameNormalizer().normalizeIdentifierQuoting( defaultName ); return new Ejb3JoinColumn( (String) null, defaultName,
params.put(PersistentIdentifierGenerator.IDENTIFIER_NORMALIZER, mappings.getObjectNameNormalizer());
params.put(PersistentIdentifierGenerator.IDENTIFIER_NORMALIZER, mappings.getObjectNameNormalizer());
catalog = BinderHelper.isEmptyAnnotationValue( catalog ) ? mappings.getCatalogName() : catalog; String realTableName = mappings.getObjectNameNormalizer().normalizeDatabaseIdentifier( nameSource.getExplicitName(), namingStrategyHelper
catalog = BinderHelper.isEmptyAnnotationValue( catalog ) ? mappings.getCatalogName() : catalog; String realTableName = mappings.getObjectNameNormalizer().normalizeDatabaseIdentifier( nameSource.getExplicitName(), namingStrategyHelper