mirror of https://github.com/apache/openjpa.git
Formatting.
git-svn-id: https://svn.apache.org/repos/asf/incubator/openjpa/trunk@443073 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
912c1262d6
commit
a9eaf4683b
|
@ -67,8 +67,8 @@ public class DiscriminatorMappingInfo
|
|||
return discrim.getMappingRepository().getMappingDefaults().
|
||||
getDiscriminatorValue(discrim, adapt);
|
||||
|
||||
if (_value.length() > 0 &&
|
||||
(_value.charAt(0) == '-' || Character.isDigit(_value.charAt(0)))) {
|
||||
if (_value.length() > 0 && (_value.charAt(0) == '-'
|
||||
|| Character.isDigit(_value.charAt(0)))) {
|
||||
try {
|
||||
if (_value.indexOf('.') == -1)
|
||||
return new Integer(_value);
|
||||
|
|
|
@ -1747,8 +1747,8 @@ public class BrokerImpl
|
|||
_flags &= ~FLAG_ACTIVE;
|
||||
_flags &= ~FLAG_FLUSHED;
|
||||
|
||||
if (_transEventManager != null &&
|
||||
_transEventManager.hasEndListeners()) {
|
||||
if (_transEventManager != null
|
||||
&& _transEventManager.hasEndListeners()) {
|
||||
_transEventManager.fireEvent(new TransactionEvent(this,
|
||||
status == Status.STATUS_COMMITTED
|
||||
? TransactionEvent.AFTER_COMMIT_COMPLETE
|
||||
|
@ -3016,11 +3016,9 @@ public class BrokerImpl
|
|||
StateManagerImpl sm;
|
||||
for (Iterator itr = states.iterator(); itr.hasNext();) {
|
||||
sm = (StateManagerImpl) itr.next();
|
||||
if (!sm.isPersistent()) {
|
||||
if (sm.getPCState() != PCState.TCLEAN)
|
||||
sm.nontransactional();
|
||||
if (!sm.isPersistent())
|
||||
itr.remove();
|
||||
} else if (!sm.getMetaData().isDetachable()) {
|
||||
else if (!sm.getMetaData().isDetachable()) {
|
||||
sm.release(true);
|
||||
itr.remove();
|
||||
}
|
||||
|
|
|
@ -17,7 +17,7 @@ package org.apache.openjpa.kernel;
|
|||
|
||||
/**
|
||||
* Lifecycle state.
|
||||
* Represents an embedded instance that is managed by a StateManager and
|
||||
* Represents an embedded instance that is managed by a StateManager and
|
||||
* may be participating in the current transaction, but has not yet been
|
||||
* modified.
|
||||
*
|
||||
|
|
|
@ -17,7 +17,7 @@ package org.apache.openjpa.kernel;
|
|||
|
||||
/**
|
||||
* Lifecycle state.
|
||||
* Represents an instance that was copied and made embedded within the
|
||||
* Represents an instance that was copied and made embedded within the
|
||||
* current transaction.
|
||||
*
|
||||
* @author Abe White
|
||||
|
|
|
@ -17,7 +17,7 @@ package org.apache.openjpa.kernel;
|
|||
|
||||
/**
|
||||
* Lifecycle state.
|
||||
* Represents an embedded instance that has been deleted in the current
|
||||
* Represents an embedded instance that has been deleted in the current
|
||||
* transaction.
|
||||
*
|
||||
* @author Abe White
|
||||
|
|
|
@ -17,7 +17,7 @@ package org.apache.openjpa.kernel;
|
|||
|
||||
/**
|
||||
* Lifecycle state.
|
||||
* Represents an embedded instance that is participating in the current
|
||||
* Represents an embedded instance that is participating in the current
|
||||
* transaction, and has been modified.
|
||||
*
|
||||
* @author Abe White
|
||||
|
|
|
@ -55,13 +55,11 @@ class ENonTransState
|
|||
}
|
||||
|
||||
PCState beforeRead(StateManagerImpl context, int field) {
|
||||
error("embed-ref", context);
|
||||
return null;
|
||||
return error("embed-ref", context);
|
||||
}
|
||||
|
||||
PCState beforeWrite(StateManagerImpl context, int field, boolean mutate) {
|
||||
error("embed-ref", context);
|
||||
return null;
|
||||
return error("embed-ref", context);
|
||||
}
|
||||
|
||||
PCState beforeOptimisticWrite(StateManagerImpl context, int field,
|
||||
|
|
|
@ -17,7 +17,7 @@ package org.apache.openjpa.kernel;
|
|||
|
||||
/**
|
||||
* Lifecycle state.
|
||||
* Represents a hollow instance that exists in the data store, but whose
|
||||
* Represents a hollow instance that exists in the data store, but whose
|
||||
* state has not been loaded and who is not active in the current transaction
|
||||
* (if any). This may be the state of instances returned on ID lookups or by
|
||||
* traversing relations, and the state of persistent instances outside of
|
||||
|
|
|
@ -17,7 +17,7 @@ package org.apache.openjpa.kernel;
|
|||
|
||||
/**
|
||||
* Lifecycle state.
|
||||
* Represents a persistent instance that is participating in the current
|
||||
* Represents a persistent instance that is participating in the current
|
||||
* transaction, but has not yet been modified.
|
||||
*
|
||||
* @author Abe White
|
||||
|
|
|
@ -17,7 +17,7 @@ package org.apache.openjpa.kernel;
|
|||
|
||||
/**
|
||||
* Lifecycle state.
|
||||
* Represents a persistent instance that has been deleted in the current
|
||||
* Represents a persistent instance that has been deleted in the current
|
||||
* transaction, and that has been flushed to the database.
|
||||
*
|
||||
* @author Patrick Linskey
|
||||
|
|
|
@ -17,7 +17,7 @@ package org.apache.openjpa.kernel;
|
|||
|
||||
/**
|
||||
* Lifecycle state.
|
||||
* Represents a persistent instance that has been deleted in the current
|
||||
* Represents a persistent instance that has been deleted in the current
|
||||
* transaction.
|
||||
*
|
||||
* @author Abe White
|
||||
|
|
|
@ -17,7 +17,7 @@ package org.apache.openjpa.kernel;
|
|||
|
||||
/**
|
||||
* Lifecycle state.
|
||||
* Represents a persistent instance that is participating in the current
|
||||
* Represents a persistent instance that is participating in the current
|
||||
* transaction, and has been modified.
|
||||
*
|
||||
* @author Abe White
|
||||
|
|
|
@ -17,7 +17,7 @@ package org.apache.openjpa.kernel;
|
|||
|
||||
/**
|
||||
* Lifecycle state.
|
||||
* Represents an instance that was made persistent, then deleted within the
|
||||
* Represents an instance that was made persistent, then deleted within the
|
||||
* current transaction.
|
||||
*
|
||||
* @author Abe White
|
||||
|
|
|
@ -17,7 +17,7 @@ package org.apache.openjpa.kernel;
|
|||
|
||||
/**
|
||||
* Lifecycle state.
|
||||
* Represents an instance that was made persistent within the
|
||||
* Represents an instance that was made persistent within the
|
||||
* current transaction, flushed, deleted, and flushed.
|
||||
*
|
||||
* @author Patrick Linskey
|
||||
|
|
|
@ -17,7 +17,7 @@ package org.apache.openjpa.kernel;
|
|||
|
||||
/**
|
||||
* Lifecycle state.
|
||||
* Represents an instance that was made persistent within the
|
||||
* Represents an instance that was made persistent within the
|
||||
* current transaction, flushed, and subsequently deleted.
|
||||
*
|
||||
* @author Patrick Linskey
|
||||
|
|
|
@ -17,7 +17,7 @@ package org.apache.openjpa.kernel;
|
|||
|
||||
/**
|
||||
* Lifecycle state.
|
||||
* Represents an instance that was made persistent within the
|
||||
* Represents an instance that was made persistent within the
|
||||
* current transaction.
|
||||
*
|
||||
* @author Abe White
|
||||
|
|
|
@ -17,7 +17,7 @@ package org.apache.openjpa.kernel;
|
|||
|
||||
/**
|
||||
* Lifecycle state.
|
||||
* Represents an instance that was deleted outside a transaction.
|
||||
* Represents an instance that was deleted outside a transaction.
|
||||
*
|
||||
* @author Steve Kim
|
||||
*/
|
||||
|
|
|
@ -17,7 +17,7 @@ package org.apache.openjpa.kernel;
|
|||
|
||||
/**
|
||||
* Lifecycle state.
|
||||
* Represents a persistent instance that has been dirtied outside of
|
||||
* Represents a persistent instance that has been dirtied outside of
|
||||
* transaction. This state is only reachable only if the
|
||||
* RetainNontransactional property is set.
|
||||
*
|
||||
|
|
|
@ -17,7 +17,7 @@ package org.apache.openjpa.kernel;
|
|||
|
||||
/**
|
||||
* Lifecycle state.
|
||||
* Represents an instance that was persisted outside a transaction.
|
||||
* Represents an instance that was persisted outside a transaction.
|
||||
*
|
||||
* @author Steve Kim
|
||||
*/
|
||||
|
|
|
@ -21,7 +21,7 @@ import org.apache.openjpa.lib.util.Localizer;
|
|||
|
||||
/**
|
||||
* Lifecycle state.
|
||||
* Represents a persistent instance that is not transactional, but that
|
||||
* Represents a persistent instance that is not transactional, but that
|
||||
* allows access to persistent data. This state is reachable only if the
|
||||
* RetainState property is set.
|
||||
*
|
||||
|
|
|
@ -17,7 +17,7 @@ package org.apache.openjpa.kernel;
|
|||
|
||||
/**
|
||||
* Lifecycle state.
|
||||
* Represents a transient instance that is managed by a StateManager and
|
||||
* Represents a transient instance that is managed by a StateManager and
|
||||
* may be participating in the current transaction, but has not yet been
|
||||
* modified.
|
||||
*
|
||||
|
|
|
@ -17,7 +17,7 @@ package org.apache.openjpa.kernel;
|
|||
|
||||
/**
|
||||
* Lifecycle state.
|
||||
* Represents a transient instance that is participating in the current
|
||||
* Represents a transient instance that is participating in the current
|
||||
* transaction, and has been modified.
|
||||
*
|
||||
* @author Abe White
|
||||
|
|
|
@ -17,7 +17,7 @@ package org.apache.openjpa.kernel;
|
|||
|
||||
/**
|
||||
* Lifecycle state.
|
||||
* Represents a temporarily managed transient instance whose fields
|
||||
* Represents a temporarily managed transient instance whose fields
|
||||
* are loaded for the purpose of field inspection such
|
||||
* as for cascades. This state should be released as soon as inspection
|
||||
* is complete.
|
||||
|
|
|
@ -17,7 +17,7 @@ package org.apache.openjpa.kernel;
|
|||
|
||||
/**
|
||||
* Lifecycle state.
|
||||
* Represents a transient instance; this state lasts only through
|
||||
* Represents a transient instance; this state lasts only through
|
||||
* the {@link #initialize} method, which immediately removes the
|
||||
* persistence capable instance from management by the OpenJPA runtime.
|
||||
*
|
||||
|
|
|
@ -1127,9 +1127,9 @@ public class MetaDataRepository
|
|||
public NonPersistentMetaData addNonMappedInterface(Class iface) {
|
||||
if (iface == null)
|
||||
return null;
|
||||
if (!iface.isInterface())
|
||||
throw new MetaDataException(_loc.get("not-non-mapped", iface));
|
||||
synchronized(this) {
|
||||
if (!iface.isInterface())
|
||||
throw new MetaDataException(_loc.get("not-non-mapped", iface));
|
||||
if (_nonMapped.containsKey(iface))
|
||||
return (NonPersistentMetaData)_nonMapped.get(iface);
|
||||
if (getCachedMetaData(iface) != null)
|
||||
|
|
|
@ -433,10 +433,11 @@ public class ValueMetaDataImpl
|
|||
_attach = vmd.getCascadeAttach();
|
||||
_refresh = vmd.getCascadeRefresh();
|
||||
_typeOverride = vmd.getTypeOverride();
|
||||
_serialized = vmd.isSerialized();
|
||||
if (_embeddedMeta != null)
|
||||
_embeddedMeta.setDescribedType(vmd.getDeclaredType());
|
||||
|
||||
// don't allow copy to override embedded; don't copy serialized at all
|
||||
// don't allow copy to override embedded
|
||||
if (_embedded == null)
|
||||
setEmbedded(vmd.isEmbedded());
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue