org.apache.openjpa.slice
Class SliceInfo

java.lang.Object
  extended by org.apache.openjpa.slice.SliceInfo
All Implemented Interfaces:
Serializable

public class SliceInfo
extends Object
implements Serializable

Holder of slice names where a persistent instance is stored. This structure is held in StateManagers to track the origin of a persistent instance.

Author:
Pinaki Poddar
See Also:
Serialized Form

Constructor Summary
SliceInfo(boolean replicated, List<String> slices)
          Generic constructor given one or more slice names.
SliceInfo(boolean replicated, String[] slices)
          Generic constructor given one or more slice names.
SliceInfo(List<String> slices)
           
SliceInfo(String slice)
          Constructor for non-replicated instance that is stored in a single slice.
SliceInfo(String[] slices)
          Constructor for replicated instance that is stored in one or more slices.
 
Method Summary
 String[] getSlices()
          Gets the name of the slice(s) held by this receiver.
 boolean isReplicated()
          Affirms if this receiver designates replicated instances.
 SliceInfo setInto(OpenJPAStateManager sm)
          Sets this receiver as the given StateManager's internal instance-level data.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SliceInfo

public SliceInfo(boolean replicated,
                 String[] slices)
Generic constructor given one or more slice names. The replicated flag is set independently.


SliceInfo

public SliceInfo(boolean replicated,
                 List<String> slices)
Generic constructor given one or more slice names. The replicated flag is set independently.


SliceInfo

public SliceInfo(String slice)
Constructor for non-replicated instance that is stored in a single slice.


SliceInfo

public SliceInfo(String[] slices)
Constructor for replicated instance that is stored in one or more slices.


SliceInfo

public SliceInfo(List<String> slices)
Method Detail

isReplicated

public boolean isReplicated()
Affirms if this receiver designates replicated instances.

Returns:

getSlices

public String[] getSlices()
Gets the name of the slice(s) held by this receiver.


setInto

public SliceInfo setInto(OpenJPAStateManager sm)
Sets this receiver as the given StateManager's internal instance-level data. If the given StateManager had existing instance-level data that is not a SliceInfo then raise an exception.



Copyright © 2006-2012 Apache Software Foundation. All Rights Reserved.