/** * For JPA standards we typically need the unqualified name. However, a more usable * impl tends to use the whole path. This method provides an easy hook for subclasses * to accomplish that * * @param attributePath The attribute path * * @return The extracted name */ protected String transformAttributePath(AttributePath attributePath) { return attributePath.getProperty(); }
public static void process(AttributePath attributePath, StringBuilder sb) { if ( attributePath.getParent() != null ) { process( attributePath.getParent(), sb ); if ( !"".equals( attributePath.getParent().getProperty() ) ) { sb.append( "_" ); } } String property = attributePath.getProperty(); property = property.replace( "<", "" ); property = property.replace( ">", "" ); sb.append( property ); } }
@Override public Identifier determineJoinTableName(ImplicitJoinTableNameSource source) { String name = source.getOwningPhysicalTableName() + "_" + source.getAssociationOwningAttributePath().getProperty(); return toIdentifier(name, source.getBuildingContext()); }
@Override public Identifier determineBasicColumnName(ImplicitBasicColumnNameSource source) { return toIdentifier( "PTCN_" + source.getAttributePath().getProperty(), source.getBuildingContext() ); }
/** * For JPA standards we typically need the unqualified name. However, a more usable * impl tends to use the whole path. This method provides an easy hook for subclasses * to accomplish that * * @param attributePath The attribute path * * @return The extracted name */ protected String transformAttributePath(AttributePath attributePath) { return attributePath.getProperty(); }
private static String getPropertyName(AttributePath attributePath) { return attributePath == null ? null : attributePath.getProperty(); }
private static String getPropertyName(AttributePath attributePath) { return attributePath == null ? null : attributePath.getProperty(); }
elementBinding, null, embeddableSource.getAttributePathBase().getProperty(), getPluralAttributeSource().getXmlNodeName(), false
private String componentPath(AttributePath attributePath) { AttributePath parentAttributePath = attributePath; StringBuilder builder = new StringBuilder( parentAttributePath.getProperty() ); while ( !attributePath.getParent().isCollectionElement() ) { attributePath = attributePath.getParent(); builder.insert( 0, "." ); builder.insert( 0, attributePath.getProperty() ); } String componentPath = builder.toString(); return componentPath; } }
public static void process(AttributePath attributePath, StringBuilder sb) { if ( attributePath.getParent() != null ) { process( attributePath.getParent(), sb ); if ( !"".equals( attributePath.getParent().getProperty() ) ) { sb.append( "_" ); } } String property = attributePath.getProperty(); property = property.replace( "<", "" ); property = property.replace( ">", "" ); sb.append( property ); } }
/** * For JPA standards we typically need the unqualified name. However, a more usable * impl tends to use the whole path. This method provides an easy hook for subclasses * to accomplish that * * @param attributePath * The attribute path * @return The extracted name */ @Override protected String transformAttributePath(final AttributePath attributePath) { return StringUtils.lowerCase(StringUtils.join(StringUtils.splitByCharacterTypeCamelCase(attributePath.getProperty()), '_')); }
@Override public Identifier determineJoinTableName(ImplicitJoinTableNameSource source) { String name = source.getOwningPhysicalTableName() + "_" + source.getAssociationOwningAttributePath().getProperty(); return toIdentifier(name, source.getBuildingContext()); }
@Override public Identifier determineBasicColumnName(ImplicitBasicColumnNameSource source) { String columnName = source.getAttributePath().getProperty(); String fullPath = source.getAttributePath().getFullPath(); String result; if (fullPath.startsWith("credentials.") || fullPath.startsWith("activation.")) { //credentials and activation are embedded and doesn't need to be qualified return super.determineBasicColumnName(source); } else { if (fullPath.contains("&&")) { // it's collection result = columnName; } else { result = fullPath.replaceAll("\\.", "_"); } } result = RUtil.fixDBSchemaObjectNameLength(result); Identifier i = toIdentifier(result, source.getBuildingContext()); LOGGER.trace("determineBasicColumnName {} {}", fullPath, i); return i; } }
String property = path.getProperty(); String columnName = source.getReferencedColumnName().getText();
elementBinding, null, embeddableSource.getAttributePathBase().getProperty(), getPluralAttributeSource().getXmlNodeName(), false