Refine search
/** * Assert that the given table is non-null. */ private static void assertTable(MetaDataContext context, Table table) { if (table == null) throw new MetaDataException(_loc.get("unmapped", context)); }
/** * Assert that the given table is non-null. */ private static void assertTable(MetaDataContext context, Table table) { if (table == null) throw new MetaDataException(_loc.get("unmapped", context)); }
/** * Return an exception indicating that we cannot join to the given relation. */ public static MetaDataException unjoinable(ValueMapping vm) { return new MetaDataException(_loc.get("cant-join", vm)); }
/** * Return an exception indicating that the relation cannot be loaded * because it has independent subclasses and does not represent a full oid. */ public static MetaDataException unloadable(ValueMapping vm) { return new MetaDataException(_loc.get("cant-load", vm)); }
private ClassMetaData metasPutInternal(Class<?> cls, ClassMetaData meta){ if (_pawares.containsKey(cls)) throw new MetaDataException(_loc.get("pc-and-aware", cls)); _metas.put(cls, meta); return meta; }
/** * Explicitly declare the given interface among the ones this * class implements. */ public void addDeclaredInterface(Class<?> iface) { if (iface == null || !iface.isInterface()) throw new MetaDataException(_loc.get("declare-non-interface", this, iface)); if (_interfaces == null) _interfaces = new ArrayList<Class<?>>(); _interfaces.add(iface); }
/** * Explicitly declare the given interface among the ones this * class implements. */ public void addDeclaredInterface(Class iface) { if (iface == null || !iface.isInterface()) throw new MetaDataException(_loc.get("declare-non-interface", this, iface)); if (_interfaces == null) _interfaces = new ArrayList(); _interfaces.add(iface); }
private ClassMetaData throwNoRegisteredAlias(String alias) { String close = getClosestAliasName(alias); if (close != null) throw new MetaDataException(_loc.get("no-alias-meta-hint", alias, _aliases, close)); else throw new MetaDataException(_loc.get("no-alias-meta", alias, _aliases)); }
private NonPersistentMetaData addPersistenceAwareInternal(Class<?> cls) { if (_pawares.containsKey(cls)) return (NonPersistentMetaData) _pawares.get(cls); if (getCachedMetaData(cls) != null) throw new MetaDataException(_loc.get("pc-and-aware", cls)); NonPersistentMetaData meta = new NonPersistentMetaData(cls, this, NonPersistentMetaData.TYPE_PERSISTENCE_AWARE); _pawares.put(cls, meta); return meta; }
private NonPersistentMetaData addNonMappedInterfaceInternal(Class<?> iface) { if (_nonMapped.containsKey(iface)) return (NonPersistentMetaData) _nonMapped.get(iface); if (getCachedMetaData(iface) != null) throw new MetaDataException(_loc.get("non-mapped-pc", iface)); NonPersistentMetaData meta = new NonPersistentMetaData(iface, this, NonPersistentMetaData.TYPE_NON_MAPPED_INTERFACE); _nonMapped.put(iface, meta); return meta; }
private NonPersistentMetaData addPersistenceAwareInternal(Class<?> cls) { if (_pawares.containsKey(cls)) return (NonPersistentMetaData) _pawares.get(cls); if (getCachedMetaData(cls) != null) throw new MetaDataException(_loc.get("pc-and-aware", cls)); NonPersistentMetaData meta = new NonPersistentMetaData(cls, this, NonPersistentMetaData.TYPE_PERSISTENCE_AWARE); _pawares.put(cls, meta); return meta; }
private NonPersistentMetaData addNonMappedInterfaceInternal(Class<?> iface) { if (_nonMapped.containsKey(iface)) return (NonPersistentMetaData) _nonMapped.get(iface); if (getCachedMetaData(iface) != null) throw new MetaDataException(_loc.get("non-mapped-pc", iface)); NonPersistentMetaData meta = new NonPersistentMetaData(iface, this, NonPersistentMetaData.TYPE_NON_MAPPED_INTERFACE); _nonMapped.put(iface, meta); return meta; }
private SequenceMetaData getSequenceMetaDataInternal(String name, ClassLoader envLoader, boolean mustExist) { SequenceMetaData meta = getSequenceMetaDataInternal(name, envLoader); if (meta == null && SequenceMetaData.NAME_SYSTEM.equals(name)) { if (_sysSeq == null) _sysSeq = newSequenceMetaData(name); return _sysSeq; } if (meta == null && mustExist) throw new MetaDataException(_loc.get("no-named-sequence", name)); return meta; }
public void map(boolean adapt) { if (!field.isSerialized()) throw new MetaDataException(_loc.get("not-serialized", field)); super.map(adapt); }
private void initializeMetaDataFactory() { if (_factory == null) { MetaDataFactory mdf = _conf.newMetaDataFactoryInstance(); if (mdf == null) throw new MetaDataException(_loc.get("no-metadatafactory")); setMetaDataFactory(mdf); } }
public void map(boolean adapt) { if (field.getTypeCode() != JavaTypes.STRING) throw new MetaDataException(_loc.get("not-clobstring", field)); super.map(adapt); }
public void map(boolean adapt) { if (!field.isSerialized()) throw new MetaDataException(_loc.get("not-serialized", field)); super.map(adapt); }
public void map(boolean adapt) { if (field.getTypeCode() != JavaTypes.STRING) throw new MetaDataException(_loc.get("not-clobstring", field)); super.map(adapt); }
public void map(boolean adapt) { if (field.getTypeCode() != JavaTypes.COLLECTION && field.getTypeCode() != JavaTypes.ARRAY) throw new MetaDataException(_loc.get("not-coll", field)); super.map(adapt); }
/** * Return the joinable for the given column, or throw an exception if * none is available. */ public Joinable assertJoinable(Column col) { Joinable join = getJoinable(col); if (join == null) throw new MetaDataException(_loc.get("no-joinable", col.getQualifiedPath().toString())); return join; }