public int getJoinDirection() { return _val.getJoinDirection(); }
public int getJoinDirection() { return _val.getJoinDirection(); }
public int getJoinDirection() { return _val.getJoinDirection(); }
public int getJoinDirection() { return _val.getJoinDirection(); }
public int getJoinDirection() { return _val.getJoinDirection(); }
vm = src; if (vm.getJoinDirection() != ValueMapping.JOIN_FORWARD) return false; ForeignKey fk = vm.getForeignKey();
/** * Return the given object as its foreign key values. * * @see FieldStrategy#toDataStoreValue */ public static Object toDataStoreValue(ValueMapping vm, Object val, JDBCStore store) { ClassMapping rel; if (val == null) { ClassMapping[] clss = vm.getIndependentTypeMappings(); rel = (clss.length > 0) ? clss[0] : vm.getTypeMapping(); } else if (val.getClass() == vm.getType()) rel = vm.getTypeMapping(); // common case else { rel = vm.getMappingRepository().getMapping(val.getClass(), store.getContext().getClassLoader(), true); } if (!rel.isMapped()) throw new UserException(_loc.get("unmapped-datastore-value", rel.getDescribedType())); Column[] cols; if (vm.getJoinDirection() == ValueMapping.JOIN_INVERSE) cols = rel.getPrimaryKeyColumns(); else cols = vm.getForeignKey(rel).getPrimaryKeyColumns(); return rel.toDataStoreValue(val, cols, store); }
/** * Return the given object as its foreign key values. * * @see FieldStrategy#toDataStoreValue */ public static Object toDataStoreValue(ValueMapping vm, Object val, JDBCStore store) { ClassMapping rel; if (val == null) { ClassMapping[] clss = vm.getIndependentTypeMappings(); rel = (clss.length > 0) ? clss[0] : vm.getTypeMapping(); } else if (val.getClass() == vm.getType()) rel = vm.getTypeMapping(); // common case else { rel = vm.getMappingRepository().getMapping(val.getClass(), store.getContext().getClassLoader(), true); } if (!rel.isMapped()) throw new UserException(_loc.get("unmapped-datastore-value", rel.getDescribedType())); Column[] cols; if (vm.getJoinDirection() == ValueMapping.JOIN_INVERSE) cols = rel.getPrimaryKeyColumns(); else cols = vm.getForeignKey(rel).getPrimaryKeyColumns(); return rel.toDataStoreValue(val, cols, store); }
/** * Return the given object as its foreign key values. * * @see FieldStrategy#toDataStoreValue */ public static Object toDataStoreValue(ValueMapping vm, Object val, JDBCStore store) { ClassMapping rel; if (val == null) { ClassMapping[] clss = vm.getIndependentTypeMappings(); rel = (clss.length > 0) ? clss[0] : vm.getTypeMapping(); } else if (val.getClass() == vm.getType()) rel = vm.getTypeMapping(); // common case else { rel = vm.getMappingRepository().getMapping(val.getClass(), store.getContext().getClassLoader(), true); } if (!rel.isMapped()) throw new UserException(_loc.get("unmapped-datastore-value", rel.getDescribedType())); Column[] cols; if (vm.getJoinDirection() == ValueMapping.JOIN_INVERSE) cols = rel.getPrimaryKeyColumns(); else cols = vm.getForeignKey(rel).getPrimaryKeyColumns(); return rel.toDataStoreValue(val, cols, store); }
/** * Return the given object as its foreign key values. * * @see FieldStrategy#toDataStoreValue */ public static Object toDataStoreValue(ValueMapping vm, Object val, JDBCStore store) { ClassMapping rel; if (val == null) { ClassMapping[] clss = vm.getIndependentTypeMappings(); rel = (clss.length > 0) ? clss[0] : vm.getTypeMapping(); } else if (val.getClass() == vm.getType()) rel = vm.getTypeMapping(); // common case else rel = vm.getMappingRepository().getMapping(val.getClass(), store.getContext().getClassLoader(), true); if (!rel.isMapped()) throw new UserException(_loc.get("unmapped-datastore-value", rel.getDescribedType())); Column[] cols; if (vm.getJoinDirection() == ValueMapping.JOIN_INVERSE) cols = rel.getPrimaryKeyColumns(); else cols = vm.getForeignKey(rel).getPrimaryKeyColumns(); return rel.toDataStoreValue(val, cols, store); }
/** * Return the given object as its foreign key values. * * @see FieldStrategy#toDataStoreValue */ public static Object toDataStoreValue(ValueMapping vm, Object val, JDBCStore store) { ClassMapping rel; if (val == null) { ClassMapping[] clss = vm.getIndependentTypeMappings(); rel = (clss.length > 0) ? clss[0] : vm.getTypeMapping(); } else if (val.getClass() == vm.getType()) rel = vm.getTypeMapping(); // common case else { rel = vm.getMappingRepository().getMapping(val.getClass(), store.getContext().getClassLoader(), true); } if (!rel.isMapped()) throw new UserException(_loc.get("unmapped-datastore-value", rel.getDescribedType())); Column[] cols; if (vm.getJoinDirection() == ValueMapping.JOIN_INVERSE) cols = rel.getPrimaryKeyColumns(); else cols = vm.getForeignKey(rel).getPrimaryKeyColumns(); return rel.toDataStoreValue(val, cols, store); }
vm = src; if (vm.getJoinDirection() != ValueMapping.JOIN_FORWARD) return false; ForeignKey fk = vm.getForeignKey();
vm = src; if (vm.getJoinDirection() != ValueMapping.JOIN_FORWARD) return false; ForeignKey fk = vm.getForeignKey();
vm = src; if (vm.getJoinDirection() != ValueMapping.JOIN_FORWARD) return false; ForeignKey fk = vm.getForeignKey();
vm = src; if (vm.getJoinDirection() != ValueMapping.JOIN_FORWARD) return false; ForeignKey fk = vm.getForeignKey();
: fm.getDefiningMapping().getTable(); Table foreign; if (val.getJoinDirection() == ValueMapping.JOIN_EXPECTED_INVERSE) { foreign = local; local = val.getTypeMapping().getTable(); } else { foreign = val.getTypeMapping().getTable(); setJoinDirection((val.getJoinDirection() == ValueMapping.JOIN_FORWARD) ? JOIN_FORWARD : JOIN_INVERSE);
: fm.getDefiningMapping().getTable(); Table foreign; if (val.getJoinDirection() == ValueMapping.JOIN_EXPECTED_INVERSE) { foreign = local; local = val.getTypeMapping().getTable(); } else { foreign = val.getTypeMapping().getTable(); setJoinDirection((val.getJoinDirection() == val.JOIN_FORWARD) ? JOIN_FORWARD : JOIN_INVERSE);
: fm.getDefiningMapping().getTable(); Table foreign; if (val.getJoinDirection() == ValueMapping.JOIN_EXPECTED_INVERSE) { foreign = local; local = val.getTypeMapping().getTable(); } else { foreign = val.getTypeMapping().getTable(); setJoinDirection((val.getJoinDirection() == ValueMapping.JOIN_FORWARD) ? JOIN_FORWARD : JOIN_INVERSE);
: fm.getDefiningMapping().getTable(); Table foreign; if (val.getJoinDirection() == ValueMapping.JOIN_EXPECTED_INVERSE) { foreign = local; local = val.getTypeMapping().getTable(); } else { foreign = val.getTypeMapping().getTable(); setJoinDirection((val.getJoinDirection() == ValueMapping.JOIN_FORWARD) ? JOIN_FORWARD : JOIN_INVERSE);
: fm.getDefiningMapping().getTable(); Table foreign; if (val.getJoinDirection() == ValueMapping.JOIN_EXPECTED_INVERSE) { foreign = local; local = val.getTypeMapping().getTable(); } else { foreign = val.getTypeMapping().getTable(); setJoinDirection((val.getJoinDirection() == ValueMapping.JOIN_FORWARD) ? JOIN_FORWARD : JOIN_INVERSE);