protected String removeHungarianNotation(String columnName) { return Normalizer.removeHungarianNotation(columnName); }
protected String removeHungarianNotation(String columnName) { return Normalizer.removeHungarianNotation(columnName); }
protected String removeHungarianNotation(String columnName) { return Normalizer.removeHungarianNotation(columnName); }
protected String removeHungarianNotation(String columnName) { return Normalizer.removeHungarianNotation(columnName); }
/** * Returns a new DBIdentifier with Hungarian notation removed. * @param name */ public static DBIdentifier removeHungarianNotation(DBIdentifier name) { DBIdentifier hName = name.clone(); if (isEmpty(hName)) { return hName; } String strName = hName.getNameInternal(); strName = Normalizer.removeHungarianNotation(strName); hName.setNameInternal(strName); return hName; }
/** * Returns a new DBIdentifier with Hungarian notation removed. * @param name * @return */ public static DBIdentifier removeHungarianNotation(DBIdentifier name) { DBIdentifier hName = name.clone(); if (isEmpty(hName)) { return hName; } String strName = hName.getNameInternal(); strName = Normalizer.removeHungarianNotation(strName); hName.setNameInternal(strName); return hName; }
/** * Returns a new DBIdentifier with Hungarian notation removed. * @param name */ public static DBIdentifier removeHungarianNotation(DBIdentifier name) { DBIdentifier hName = name.clone(); if (isEmpty(hName)) { return hName; } String strName = hName.getNameInternal(); strName = Normalizer.removeHungarianNotation(strName); hName.setNameInternal(strName); return hName; }
/** * Returns a new DBIdentifier with Hungarian notation removed. * @param name * @return */ public static DBIdentifier removeHungarianNotation(DBIdentifier name) { DBIdentifier hName = name.clone(); if (isEmpty(hName)) { return hName; } String strName = hName.getNameInternal(); strName = Normalizer.removeHungarianNotation(strName); hName.setNameInternal(strName); return hName; }
public void populateForeignKeyColumn(ValueMapping vm, DBIdentifier sName, Table local, Table foreign, Column col, Object target, boolean inverse, int pos, int cols) { boolean elem = vm == vm.getFieldMapping().getElement() && vm.getFieldMapping().getTypeCode() != JavaTypes.MAP; // if this is a non-inverse collection element key, it must be in // a join table: if we're not prepending the field name, leave the // default if (!_prependFieldNameToJoinTableInverseJoinColumns && !inverse && elem) return; // otherwise jpa always uses <field>_<pkcol> for column name, even // when only one col if (target instanceof Column) { if (DBIdentifier.isNull(sName)) { sName = col.getIdentifier(); } else { if (elem) sName = DBIdentifier.newColumn(vm.getFieldMapping().getName()); if (isRemoveHungarianNotation()) sName = DBIdentifier.newColumn(Normalizer.removeHungarianNotation(sName.getName())); sName = sName.combine(sName, ((Column)target).getIdentifier().getName()); // No need to check for uniqueness. sName = dict.getValidColumnName(sName, local, false); } col.setIdentifier(sName); } }
public void populateForeignKeyColumn(ValueMapping vm, DBIdentifier sName, Table local, Table foreign, Column col, Object target, boolean inverse, int pos, int cols) { boolean elem = vm == vm.getFieldMapping().getElement() && vm.getFieldMapping().getTypeCode() != JavaTypes.MAP; // if this is a non-inverse collection element key, it must be in // a join table: if we're not prepending the field name, leave the // default if (!_prependFieldNameToJoinTableInverseJoinColumns && !inverse && elem) return; // otherwise jpa always uses <field>_<pkcol> for column name, even // when only one col if (target instanceof Column) { if (DBIdentifier.isNull(sName)) { sName = col.getIdentifier(); } else { if (elem) sName = DBIdentifier.newColumn(vm.getFieldMapping().getName()); if (isRemoveHungarianNotation()) sName = DBIdentifier.newColumn(Normalizer.removeHungarianNotation(sName.getName())); sName = sName.combine(sName, ((Column)target).getIdentifier().getName()); // No need to check for uniqueness. sName = dict.getValidColumnName(sName, local, false); } col.setIdentifier(sName); } }
public void populateForeignKeyColumn(ValueMapping vm, DBIdentifier sName, Table local, Table foreign, Column col, Object target, boolean inverse, int pos, int cols) { boolean elem = vm == vm.getFieldMapping().getElement() && vm.getFieldMapping().getTypeCode() != JavaTypes.MAP; // if this is a non-inverse collection element key, it must be in // a join table: if we're not prepending the field name, leave the // default if (!_prependFieldNameToJoinTableInverseJoinColumns && !inverse && elem) return; // otherwise jpa always uses <field>_<pkcol> for column name, even // when only one col if (target instanceof Column) { if (DBIdentifier.isNull(sName)) { sName = col.getIdentifier(); } else { if (elem) sName = DBIdentifier.newColumn(vm.getFieldMapping().getName()); if (isRemoveHungarianNotation()) sName = DBIdentifier.newColumn(Normalizer.removeHungarianNotation(sName.getName())); sName = sName.combine(sName, ((Column)target).getIdentifier().getName()); // No need to check for uniqueness. sName = dict.getValidColumnName(sName, local, false); } col.setIdentifier(sName); } }