org.apache.openjpa.slice
Class SlicePersistence

java.lang.Object
  extended by org.apache.openjpa.slice.SlicePersistence

public class SlicePersistence
extends Object

A helper to determine the slice identifier of an instance.

Author:
Pinaki Poddar

Field Summary
static String HINT_TARGET
          The key for setting the Query hints.
 
Constructor Summary
SlicePersistence()
           
 
Method Summary
static String getSlice(Object obj)
          Get the slice identifier for the given instance if it is a managed instance and has been assigned to a slice.
static boolean isReplicated(Object obj)
          Affirms if the given instance is replicated, provided the given instance is managed.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

HINT_TARGET

public static final String HINT_TARGET
The key for setting the Query hints. The value is comma-separated Slice names. If the hint is specified then the query is executed only on the listed slices.

See Also:
Constant Field Values
Constructor Detail

SlicePersistence

public SlicePersistence()
Method Detail

getSlice

public static String getSlice(Object obj)
Get the slice identifier for the given instance if it is a managed instance and has been assigned to a slice. If the given instance is replicated across multiple slices then returns comma-separated list of slice names.

Returns:
name of the slice, if any. null otherwise.

isReplicated

public static boolean isReplicated(Object obj)
Affirms if the given instance is replicated, provided the given instance is managed.



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