Package org.apache.openjpa.slice
Class Slice
- java.lang.Object
-
- org.apache.openjpa.slice.Slice
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Comparable<Slice>
public class Slice extends java.lang.Object implements java.lang.Comparable<Slice>, java.io.Serializable
Represents a database slice of immutable logical name, a configuration and status. A Slice is uniquely identified by its logical name.- Author:
- Pinaki Poddar
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
Slice.Status
-
Constructor Summary
Constructors Constructor Description Slice(java.lang.String name, OpenJPAConfiguration conf)
Supply the logical name and configuration.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
compareTo(Slice other)
boolean
equals(java.lang.Object other)
Equals by name.OpenJPAConfiguration
getConfiguration()
java.lang.String
getName()
Gets the immutable logical name.Slice.Status
getStatus()
int
hashCode()
boolean
isActive()
void
setStatus(Slice.Status status)
java.lang.String
toString()
-
-
-
Constructor Detail
-
Slice
public Slice(java.lang.String name, OpenJPAConfiguration conf)
Supply the logical name and configuration.
-
-
Method Detail
-
getName
public java.lang.String getName()
Gets the immutable logical name.
-
getConfiguration
public OpenJPAConfiguration getConfiguration()
-
getStatus
public Slice.Status getStatus()
-
setStatus
public void setStatus(Slice.Status status)
-
isActive
public boolean isActive()
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
compareTo
public int compareTo(Slice other)
- Specified by:
compareTo
in interfacejava.lang.Comparable<Slice>
-
equals
public boolean equals(java.lang.Object other)
Equals by name.- Overrides:
equals
in classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
-