public InvalidStateException(Message msg, Object failed) { super(msg); setFailedObject(failed); }
/** * Throw an error with a localized message identified by the given key. */ PCState error(String key, StateManagerImpl context) { throw new InvalidStateException(_loc.get(key)). setFailedObject(context.getManagedInstance()); }
/** * Throw an error with a localized message identified by the given key. */ PCState error(String key, StateManagerImpl context) { throw new InvalidStateException(_loc.get(key)). setFailedObject(context.getManagedInstance()); }
/** * Throw an error with a localized message identified by the given key. */ PCState error(String key, StateManagerImpl context) { throw new InvalidStateException(_loc.get(key)). setFailedObject(context.getManagedInstance()); }
/** * Throw an inconsistency exception */ protected void throwException(OpenJPAStateManager sm, FieldMetaData fmd) { throw new InvalidStateException(_loc.get("inverse-consistency", fmd, sm.getId(), sm.getContext())).setFailedObject (sm.getManagedInstance()).setFatal(true); } }
/** * Throw appropriate exception on attempt to flush an unmapped object. */ private static void throwFlushException(OpenJPAStateManager sm) { throw new InvalidStateException(_loc.get("flush-virtual", sm.getMetaData(), sm.getObjectId())). setFailedObject(sm.getManagedInstance()). setFatal(true); } }
/** * Throw an inconsistency exception */ protected void throwException(OpenJPAStateManager sm, FieldMetaData fmd) { throw new InvalidStateException(_loc.get("inverse-consistency", fmd, sm.getId(), sm.getContext())).setFailedObject (sm.getManagedInstance()).setFatal(true); } }
/** * Throw appropriate exception on attempt to flush an unmapped object. */ private static void throwFlushException(OpenJPAStateManager sm) { throw new InvalidStateException(_loc.get("flush-virtual", sm.getMetaData(), sm.getObjectId())). setFailedObject(sm.getManagedInstance()). setFatal(true); } }
/** * Disallows changing primary key fields for instances. */ private void assertNoPrimaryKeyChange(int field) { if (_oid != null && _meta.getField(field).isPrimaryKey()) throw translate(new InvalidStateException(_loc.get ("change-identity")).setFailedObject(getManagedInstance())); }
/** * Throw appropriate exception on attempt to flush an unmapped object. */ private static void throwFlushException(OpenJPAStateManager sm) { throw new InvalidStateException(_loc.get("flush-virtual", sm.getMetaData(), sm.getObjectId())). setFailedObject(sm.getManagedInstance()). setFatal(true); } }
/** * Throw an inconsistency exception */ protected void throwException(OpenJPAStateManager sm, FieldMetaData fmd) { throw new InvalidStateException(_loc.get("inverse-consistency", fmd, sm.getId(), sm.getContext())).setFailedObject (sm.getManagedInstance()).setFatal(true); } }
/** * Disallows changing primary key fields for instances. */ private void assertNoPrimaryKeyChange(int field) { if (_oid != null && _meta.getField(field).isPrimaryKey()) throw translate(new InvalidStateException(_loc.get ("change-identity")).setFailedObject(getManagedInstance())); }
/** * Throw an inconsistency exception */ protected void throwException(OpenJPAStateManager sm, FieldMetaData fmd) { throw new InvalidStateException(_loc.get("inverse-consistency", fmd, sm.getId(), sm.getContext())).setFailedObject (sm.getManagedInstance()).setFatal(true); } }
/** * Disallows changing primary key fields for instances. */ private void assertNoPrimaryKeyChange(int field) { if (_oid != null && _meta.getField(field).isPrimaryKey()) throw translate(new InvalidStateException(_loc.get ("change-identity")).setFailedObject(getManagedInstance())); }
/** * Throw appropriate exception on attempt to flush an unmapped object. */ private static void throwFlushException(OpenJPAStateManager sm) { throw new InvalidStateException(_loc.get("flush-virtual", sm.getMetaData(), sm.getObjectId())). setFailedObject(sm.getManagedInstance()). setFatal(true); } }
/** * Disallows setting an object id field to a managed instance. */ void assertNotManagedObjectId(Object val) { if (val != null && (ImplHelper.toPersistenceCapable(val, getContext().getConfiguration())).pcGetGenericContext()!= null) throw translate(new InvalidStateException(_loc.get ("managed-oid", Exceptions.toString(val), Exceptions.toString(getManagedInstance()))). setFailedObject(getManagedInstance())); }
/** * Disallows setting an object id field to a managed instance. */ void assertNotManagedObjectId(Object val) { if (val != null && (ImplHelper.toPersistenceCapable(val, getContext().getConfiguration())).pcGetGenericContext()!= null) throw translate(new InvalidStateException(_loc.get ("managed-oid", Exceptions.toString(val), Exceptions.toString(getManagedInstance()))). setFailedObject(getManagedInstance())); }
/** * Disallows setting an object id field to a managed instance. */ void assertNotManagedObjectId(Object val) { if (val != null && (ImplHelper.toPersistenceCapable(val, getContext().getConfiguration())).pcGetGenericContext()!= null) throw translate(new InvalidStateException(_loc.get ("managed-oid", Exceptions.toString(val), Exceptions.toString(getManagedInstance()))). setFailedObject(getManagedInstance())); }
/** * Disallows setting an object id field to a managed instance. */ void assertNotManagedObjectId(Object val) { if (val != null && (ImplHelper.toPersistenceCapable(val, getContext().getConfiguration())).pcGetGenericContext()!= null) throw translate(new InvalidStateException(_loc.get ("managed-oid", Exceptions.toString(val), Exceptions.toString(getManagedInstance()))). setFailedObject(getManagedInstance())); }
/** * Disallows setting an object id field to a managed instance. */ void assertNotManagedObjectId(Object val) { if (val != null && (ImplHelper.toPersistenceCapable(val, getContext().getConfiguration())).pcGetGenericContext()!= null) throw translate(new InvalidStateException(_loc.get ("managed-oid", Exceptions.toString(val), Exceptions.toString(getManagedInstance()))). setFailedObject(getManagedInstance())); }