org.usergrid.persistence
Class SimpleEntityRef

java.lang.Object
  extended by org.usergrid.persistence.SimpleEntityRef
All Implemented Interfaces:
EntityRef
Direct Known Subclasses:
ConnectedEntityRefImpl

public class SimpleEntityRef
extends Object
implements EntityRef


Field Summary
protected  UUID id
           
static UUID NULL_ID
           
protected  String type
           
 
Constructor Summary
SimpleEntityRef(EntityRef entityRef)
           
SimpleEntityRef(String type, UUID id)
           
SimpleEntityRef(UUID id)
           
 
Method Summary
 boolean equals(Object obj)
           
 String getType()
          Gets the type.
static String getType(EntityRef ref)
           
 UUID getUuid()
          Gets the id.
static UUID getUuid(EntityRef ref)
           
 int hashCode()
           
static EntityRef ref()
           
static EntityRef ref(EntityRef ref)
           
static EntityRef ref(String entityType, UUID entityId)
           
static EntityRef ref(UUID entityId)
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

NULL_ID

public static final UUID NULL_ID

type

protected final String type

id

protected final UUID id
Constructor Detail

SimpleEntityRef

public SimpleEntityRef(UUID id)

SimpleEntityRef

public SimpleEntityRef(String type,
                       UUID id)

SimpleEntityRef

public SimpleEntityRef(EntityRef entityRef)
Method Detail

ref

public static EntityRef ref()

getUuid

public UUID getUuid()
Description copied from interface: EntityRef
Gets the id.

Specified by:
getUuid in interface EntityRef
Returns:
the id

getType

public String getType()
Description copied from interface: EntityRef
Gets the type.

Specified by:
getType in interface EntityRef
Returns:
the type

ref

public static EntityRef ref(String entityType,
                            UUID entityId)

ref

public static EntityRef ref(UUID entityId)

ref

public static EntityRef ref(EntityRef ref)

hashCode

public int hashCode()
Overrides:
hashCode in class Object

equals

public boolean equals(Object obj)
Overrides:
equals in class Object

toString

public String toString()
Overrides:
toString in class Object

getUuid

public static UUID getUuid(EntityRef ref)

getType

public static String getType(EntityRef ref)


Copyright © 2013. All Rights Reserved.