Skip navigation links

Oracle® WebCenter Content Java API Reference for Imaging
11g Release 1 (11.1.1)

E12853-03


oracle.imaging
Class BaseId

java.lang.Object
  extended by oracle.imaging.BaseId

Direct Known Subclasses:
Application.FieldDefinition, Definition, Document.FieldValue, NameId

public abstract class BaseId
extends java.lang.Object

Field Summary
static java.util.Comparator<BaseId> ID_COMPARATOR
           
static java.util.Comparator<BaseId> NAME_COMPARATOR
           

 

Constructor Summary
BaseId()
           

 

Method Summary
 boolean equals(java.lang.Object object)
          Compares the two BaseIds and returns true if they logically reference the same item.
abstract  long getId()
          Returns the Id property value.
abstract  java.lang.String getName()
          Returns the Name property value.
 int hashCode()
          Generates a hashCode value based on the guid and name field values.
protected  java.lang.String nameTrimOrNull(java.lang.String name)
           
abstract  void setId(long id)
          Sets the Id property value.
abstract  void setName(java.lang.String name)
          Sets the Name property value.
 NameId toNameId()
           
 java.lang.String toString()
           

 

Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait

 

Field Detail

ID_COMPARATOR

public static final java.util.Comparator<BaseId> ID_COMPARATOR

NAME_COMPARATOR

public static final java.util.Comparator<BaseId> NAME_COMPARATOR

Constructor Detail

BaseId

public BaseId()

Method Detail

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

equals

public boolean equals(java.lang.Object object)
Compares the two BaseIds and returns true if they logically reference the same item. Two BaseIds are equal if: BaseIds are not equal for any other condition.

In some cases, these rules will violate the contract that any two objects that are will return the same hashCode. The BaseId hashCode is a combination of both id and name, so use of BaseIds in a hash map will required that either id only, name only, or full id and name together are used exclusively within the hashmap.

Overrides:
equals in class java.lang.Object
Parameters:
object - The other object to compare against. If both are null, the comparison will return false.
Returns:
true if the BaseIds reference the same item.

hashCode

public int hashCode()
Generates a hashCode value based on the guid and name field values.
Overrides:
hashCode in class java.lang.Object
Returns:
A hashCode value based on the guid and name field values.

nameTrimOrNull

protected java.lang.String nameTrimOrNull(java.lang.String name)

toNameId

public NameId toNameId()

setId

public abstract void setId(long id)
Sets the Id property value.
Parameters:
id - The new Id property value.

getId

public abstract long getId()
Returns the Id property value.
Returns:
The Id property value.

setName

public abstract void setName(java.lang.String name)
Sets the Name property value. The maximum length of this property is determined by the ImagingConstants.NAME_LENGTH constant.
Parameters:
name - The new Name property value.

getName

public abstract java.lang.String getName()
Returns the Name property value.
Returns:
The Name Property value.

Skip navigation links

Oracle® WebCenter Content Java API Reference for Imaging
11g Release 1 (11.1.1)

E12853-03


Copyright © 2010, 2011, Oracle and/or its affiliates. All rights reserved.