com.force.sdk.jpa.query
Class TupleName

java.lang.Object
  extended by com.force.sdk.jpa.query.TupleName

public class TupleName
extends Object

This is a conveneient class to maintain short and long names for a tuple i.e. c as short and a.b.c as long name.

Author:
Fiaz Hossain

Constructor Summary
TupleName(List<String> tuple)
          Create a tuple name out of a list.
TupleName(String name)
          Create a tuple name from just one string.
 
Method Summary
 boolean equals(Object obj)
           
 String getLongName()
          Return the tuple long name.
 String getShortName()
          Return tuple short name.
 String getShortNamePrefix()
          Return the prefix that when combined with the tuple short name creates the tuple long name.
 List<String> getTuple()
           
 int hashCode()
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

TupleName

public TupleName(List<String> tuple)
Create a tuple name out of a list.

Parameters:
tuple - A list of strings that make up the name

TupleName

public TupleName(String name)
Create a tuple name from just one string.

Parameters:
name - the name of the tuple
Method Detail

getTuple

public List<String> getTuple()

getShortName

public String getShortName()
Return tuple short name.

Returns:
tuple short name

getShortNamePrefix

public String getShortNamePrefix()
Return the prefix that when combined with the tuple short name creates the tuple long name.

E.g. If tuple long name is a.b.c, the short name prefix is a.b

Returns:
short name prefix

getLongName

public String getLongName()
Return the tuple long name.

Returns:
fully qualified tuple name

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


Copyright © 2011. All Rights Reserved.