Java Code Examples for org.hibernate.internal.util.StringHelper#unqualify()
The following examples show how to use
org.hibernate.internal.util.StringHelper#unqualify() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: AbstractEntitySourceImpl.java From lams with GNU General Public License v2.0 | 6 votes |
public static EntityNamingSourceImpl extractEntityNamingSource( MappingDocument sourceMappingDocument, EntityInfo jaxbEntityMapping) { final String className = sourceMappingDocument.qualifyClassName( jaxbEntityMapping.getName() ); final String entityName; final String jpaEntityName; if ( StringHelper.isNotEmpty( jaxbEntityMapping.getEntityName() ) ) { entityName = jaxbEntityMapping.getEntityName(); jpaEntityName = jaxbEntityMapping.getEntityName(); } else { entityName = className; jpaEntityName = StringHelper.unqualify( className ); } return new EntityNamingSourceImpl( entityName, className, jpaEntityName ); }
Example 2
Source File: MappingDocument.java From lams with GNU General Public License v2.0 | 5 votes |
@Override public void processQueryRenames() { for ( JaxbHbmClassRenameType renameBinding : documentRoot.getImport() ) { final String name = qualifyClassName( renameBinding.getClazz() ); final String rename = renameBinding.getRename() == null ? StringHelper.unqualify( name ) : renameBinding.getRename(); getMetadataCollector().addImport( rename, name ); log.debugf( "Import (query rename): %s -> %s", rename, name ); } }
Example 3
Source File: ImplicitNamingStrategyJpaCompliantImpl.java From lams with GNU General Public License v2.0 | 5 votes |
protected String transformEntityName(EntityNaming entityNaming) { // prefer the JPA entity name, if specified... if ( StringHelper.isNotEmpty( entityNaming.getJpaEntityName() ) ) { return entityNaming.getJpaEntityName(); } else { // otherwise, use the Hibernate entity name return StringHelper.unqualify( entityNaming.getEntityName() ); } }
Example 4
Source File: DefaultNamingStrategy.java From lams with GNU General Public License v2.0 | 5 votes |
/** * Return the unqualified property name, not the best strategy but a backward compatible one */ public String collectionTableName( String ownerEntity, String ownerEntityTable, String associatedEntity, String associatedEntityTable, String propertyName ) { //use a degenerated strategy for backward compatibility return StringHelper.unqualify(propertyName); }
Example 5
Source File: DefaultNamingStrategy.java From lams with GNU General Public License v2.0 | 5 votes |
/** * Return the property name or propertyTableName */ public String foreignKeyColumnName( String propertyName, String propertyEntityName, String propertyTableName, String referencedColumnName ) { String header = propertyName != null ? StringHelper.unqualify( propertyName ) : propertyTableName; if (header == null) throw new AssertionFailure("NammingStrategy not properly filled"); return columnName( header ); //+ "_" + referencedColumnName not used for backward compatibility }
Example 6
Source File: ImprovedNamingStrategy.java From lams with GNU General Public License v2.0 | 5 votes |
/** * Return the property name or propertyTableName */ public String foreignKeyColumnName( String propertyName, String propertyEntityName, String propertyTableName, String referencedColumnName ) { String header = propertyName != null ? StringHelper.unqualify( propertyName ) : propertyTableName; if (header == null) throw new AssertionFailure("NamingStrategy not properly filled"); return columnName( header ); //+ "_" + referencedColumnName not used for backward compatibility }
Example 7
Source File: EntityAction.java From lams with GNU General Public License v2.0 | 4 votes |
@Override public String toString() { return StringHelper.unqualify( getClass().getName() ) + MessageHelper.infoString( entityName, id ); }
Example 8
Source File: ImplicitNamingStrategyLegacyHbmImpl.java From lams with GNU General Public License v2.0 | 4 votes |
@Override protected String transformEntityName(EntityNaming entityNaming) { return StringHelper.unqualify( entityNaming.getEntityName() ); }
Example 9
Source File: AbstractCollectionPersister.java From lams with GNU General Public License v2.0 | 4 votes |
@Override public String toString() { return StringHelper.unqualify( getClass().getName() ) + '(' + navigableRole.getFullPath() + ')'; }
Example 10
Source File: AbstractEntityPersister.java From lams with GNU General Public License v2.0 | 4 votes |
public String toString() { return StringHelper.unqualify( getClass().getName() ) + '(' + entityMetamodel.getName() + ')'; }
Example 11
Source File: ImprovedNamingStrategy.java From lams with GNU General Public License v2.0 | 4 votes |
/** * Return the column name if explicit or the concatenation of the property name and the referenced column */ public String logicalCollectionColumnName(String columnName, String propertyName, String referencedColumn) { return StringHelper.isNotEmpty( columnName ) ? columnName : StringHelper.unqualify( propertyName ) + "_" + referencedColumn; }
Example 12
Source File: ImprovedNamingStrategy.java From lams with GNU General Public License v2.0 | 4 votes |
/** * Return the column name or the unqualified property name */ public String logicalColumnName(String columnName, String propertyName) { return StringHelper.isNotEmpty( columnName ) ? columnName : StringHelper.unqualify( propertyName ); }
Example 13
Source File: EntityBinder.java From lams with GNU General Public License v2.0 | 4 votes |
private EntityTableObjectNameSource(String explicitName, String entityName) { this.explicitName = explicitName; this.logicalName = StringHelper.isNotEmpty( explicitName ) ? explicitName : StringHelper.unqualify( entityName ); }
Example 14
Source File: EJB3NamingStrategy.java From lams with GNU General Public License v2.0 | 4 votes |
public String classToTableName(String className) { return StringHelper.unqualify( className ); }
Example 15
Source File: DefaultNamingStrategy.java From lams with GNU General Public License v2.0 | 4 votes |
/** * Return the unqualified property name */ public String propertyToColumnName(String propertyName) { return StringHelper.unqualify(propertyName); }
Example 16
Source File: DefaultNamingStrategy.java From lams with GNU General Public License v2.0 | 4 votes |
/** * Return the unqualified class name */ public String classToTableName(String className) { return StringHelper.unqualify(className); }
Example 17
Source File: EJB3NamingStrategy.java From lams with GNU General Public License v2.0 | 4 votes |
public String logicalCollectionColumnName(String columnName, String propertyName, String referencedColumn) { return StringHelper.isNotEmpty( columnName ) ? columnName : StringHelper.unqualify( propertyName ) + "_" + referencedColumn; }
Example 18
Source File: EJB3NamingStrategy.java From lams with GNU General Public License v2.0 | 4 votes |
public String logicalColumnName(String columnName, String propertyName) { return StringHelper.isNotEmpty( columnName ) ? columnName : StringHelper.unqualify( propertyName ); }
Example 19
Source File: CollectionAction.java From lams with GNU General Public License v2.0 | 4 votes |
@Override public String toString() { return StringHelper.unqualify( getClass().getName() ) + MessageHelper.infoString( collectionRole, key ); }
Example 20
Source File: GrailsHibernateUtil.java From gorm-hibernate5 with Apache License 2.0 | 4 votes |
public static String unqualify(final String qualifiedName) { return StringHelper.unqualify(qualifiedName); }