public Builder setImplicitSchemaName(String implicitSchemaName) { if ( StringHelper.isNotEmpty( implicitSchemaName ) ) { this.implicitSchemaName = implicitSchemaName; } return this; }
public Builder setImplicitCatalogName(String implicitCatalogName) { if ( StringHelper.isNotEmpty( implicitCatalogName ) ) { this.implicitCatalogName = implicitCatalogName; } return this; }
@Override public String logicalCollectionColumnName(String columnName, String propertyName, String referencedColumn) { return StringHelper.isNotEmpty( columnName ) ? columnName : propertyName + "_" + referencedColumn; }
public EntityNamingSourceImpl(String entityName, String className, String jpaEntityName) { this.entityName = entityName; this.className = className; this.jpaEntityName = jpaEntityName; this.typeName = StringHelper.isNotEmpty( className ) ? className : entityName; }
public Builder setImplicitTenantIdColumnName(String implicitTenantIdColumnName) { if ( StringHelper.isNotEmpty( implicitTenantIdColumnName ) ) { this.implicitTenantIdColumnName = implicitTenantIdColumnName; } return this; }
public Builder setImplicitPackageName(String implicitPackageName) { if ( StringHelper.isNotEmpty( implicitPackageName ) ) { this.implicitPackageName = implicitPackageName; } return this; }
public Builder setImplicitIdColumnName(String implicitIdColumnName) { if ( StringHelper.isNotEmpty( implicitIdColumnName ) ) { this.implicitIdColumnName = implicitIdColumnName; } return this; }
public Builder setImplicitDiscriminatorColumnName(String implicitDiscriminatorColumnName) { if ( StringHelper.isNotEmpty( implicitDiscriminatorColumnName ) ) { this.implicitDiscriminatorColumnName = implicitDiscriminatorColumnName; } return this; }
public Builder setImplicitCascadeStyleName(String implicitCascadeStyleName) { if ( StringHelper.isNotEmpty( implicitCascadeStyleName ) ) { this.implicitCascadeStyleName = implicitCascadeStyleName; } return this; }
public void setName(String name) { if ( StringHelper.isNotEmpty( name ) && Dialect.QUOTE.indexOf( name.charAt( 0 ) ) > -1 //TODO: deprecated, remove eventually ) { quoted = true; this.name = name.substring( 1, name.length() - 1 ); } else { this.name = name; } }
public static String buildSafeClassName(String className, String defaultPackageName) { if ( className.indexOf( '.' ) < 0 && StringHelper.isNotEmpty( defaultPackageName ) ) { className = StringHelper.qualify( defaultPackageName, className ); } return className; }
/** * Return the column name or the unqualified property name */ public String logicalColumnName(String columnName, String propertyName) { return StringHelper.isNotEmpty( columnName ) ? columnName : StringHelper.unqualify( propertyName ); }
/** * 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; } }
public String logicalCollectionColumnName(String columnName, String propertyName, String referencedColumn) { return StringHelper.isNotEmpty( columnName ) ? columnName : StringHelper.unqualify( propertyName ) + "_" + referencedColumn; } }
private static void copyBooleanAttribute(AnnotationDescriptor descriptor, Element element, String attribute) { String attributeValue = element.attributeValue( attribute ); if ( StringHelper.isNotEmpty( attributeValue ) ) { String javaAttribute = getJavaAttributeNameFromXMLOne( attribute ); descriptor.setValue( javaAttribute, Boolean.parseBoolean( attributeValue ) ); } }
public NamedEntityGraphDefinition(NamedEntityGraph annotation, String jpaEntityName, String entityName) { this.annotation = annotation; this.jpaEntityName = jpaEntityName; this.entityName = entityName; this.name = StringHelper.isNotEmpty( annotation.name() ) ? annotation.name() : jpaEntityName; if ( name == null ) { throw new IllegalArgumentException( "Named entity graph name cannot be null" ); } }
@Override public void setText(String s) { // for some reason the antlr.CommonAST initialization routines force // this method to get called twice. The first time with an empty string if ( StringHelper.isNotEmpty( s ) ) { constantExpression = s; constantValue = ReflectHelper.getConstantValue( s, factory ); heuristicType = factory.getTypeResolver().heuristicType( constantValue.getClass().getName() ); super.setText( s ); } }
public PluralAttributeElementSourceOneToManyImpl( MappingDocument mappingDocument, final PluralAttributeSource pluralAttributeSource, final JaxbHbmOneToManyCollectionElementType jaxbOneToManyElement, String cascadeString) { super( mappingDocument, pluralAttributeSource ); this.jaxbOneToManyElement = jaxbOneToManyElement; this.cascadeString = cascadeString; this.referencedEntityName = StringHelper.isNotEmpty( jaxbOneToManyElement.getEntityName() ) ? jaxbOneToManyElement.getEntityName() : mappingDocument.qualifyClassName( jaxbOneToManyElement.getClazz() ); }
private static void checkFilterConditions(Collection collValue) { //for now it can't happen, but sometime soon... if ( ( collValue.getFilters().size() != 0 || StringHelper.isNotEmpty( collValue.getWhere() ) ) && collValue.getFetchMode() == FetchMode.JOIN && !( collValue.getElement() instanceof SimpleValue ) && //SimpleValue (CollectionOfElements) are always SELECT but it does not matter collValue.getElement().getFetchMode() != FetchMode.JOIN ) { throw new MappingException( "@ManyToMany or @CollectionOfElements defining filter or where without join fetching " + "not valid within collection using join fetching[" + collValue.getRole() + "]" ); } }
private Identifier determineSchemaName(TableSpecificationSource tableSpecSource) { if ( StringHelper.isNotEmpty( tableSpecSource.getExplicitSchemaName() ) ) { return database.toIdentifier( tableSpecSource.getExplicitSchemaName() ); } else { return database.getDefaultNamespace().getName().getSchema(); } }