Package org.exbin.xbup.catalog.entity
Class XBEItem
- java.lang.Object
-
- org.exbin.xbup.catalog.entity.XBEItem
-
- All Implemented Interfaces:
java.io.Serializable
,XBMBase
,XBMItem
,org.exbin.xbup.core.catalog.base.XBCBase
,org.exbin.xbup.core.catalog.base.XBCItem
- Direct Known Subclasses:
XBENode
,XBERev
,XBESpec
,XBESpecDef
@ParametersAreNonnullByDefault public class XBEItem extends java.lang.Object implements XBMItem, java.io.Serializable
Shared entity for various catalog items.- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected java.lang.Long
id
-
Constructor Summary
Constructors Constructor Description XBEItem()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(java.lang.Object object)
Determines whether another object is equal to this Item.long
getId()
java.util.Optional<org.exbin.xbup.core.catalog.base.XBCItem>
getParentItem()
long
getXBIndex()
int
hashCode()
Returns a hash code value for the object.void
setParentItem(org.exbin.xbup.core.catalog.base.XBCItem parent)
Sets owner or parent of item.void
setXBIndex(long xbIndex)
Sets basic indexing value.java.lang.String
toString()
Returns a string representation of the object.
-
-
-
Method Detail
-
getId
public long getId()
- Specified by:
getId
in interfaceorg.exbin.xbup.core.catalog.base.XBCBase
-
hashCode
public int hashCode()
Returns a hash code value for the object. This implementation computes a hash code value based on the id fields in this object.- Overrides:
hashCode
in classjava.lang.Object
- Returns:
- a hash code value for this object.
-
equals
public boolean equals(@Nullable java.lang.Object object)
Determines whether another object is equal to this Item. The result istrue
if and only if the argument is not null and is a Item object that has the same id field values as this object.- Overrides:
equals
in classjava.lang.Object
- Parameters:
object
- the reference object with which to compare- Returns:
true
if this object is the same as the argument;false
otherwise.
-
toString
@Nonnull public java.lang.String toString()
Returns a string representation of the object. This implementation constructs that representation based on the id fields.- Overrides:
toString
in classjava.lang.Object
- Returns:
- a string representation of the object
-
getXBIndex
public long getXBIndex()
- Specified by:
getXBIndex
in interfaceorg.exbin.xbup.core.catalog.base.XBCItem
-
setXBIndex
public void setXBIndex(long xbIndex)
Description copied from interface:XBMItem
Sets basic indexing value.- Specified by:
setXBIndex
in interfaceXBMItem
- Parameters:
xbIndex
- XB Index
-
getParentItem
@Nonnull public java.util.Optional<org.exbin.xbup.core.catalog.base.XBCItem> getParentItem()
- Specified by:
getParentItem
in interfaceorg.exbin.xbup.core.catalog.base.XBCItem
-
setParentItem
public void setParentItem(@Nullable org.exbin.xbup.core.catalog.base.XBCItem parent)
Description copied from interface:XBMItem
Sets owner or parent of item.- Specified by:
setParentItem
in interfaceXBMItem
- Parameters:
parent
- item
-
-