org.lateralnz.common.model
Class CompositeKey

java.lang.Object
  extended by org.lateralnz.common.model.CompositeKey
All Implemented Interfaces:
java.io.Serializable, Constants

public class CompositeKey
extends java.lang.Object
implements java.io.Serializable, Constants

a key 'holder' containing primary key, plus secondary key data

See Also:
Serialized Form

Field Summary
 
Fields inherited from interface org.lateralnz.common.util.Constants
AMPERSAND, AND, APPLICATION_X_WWW_FORM_URLENCODED, ASTERISK, AT, BACK_SLASH, CHAR_LEFT_CHEV, CHAR_RIGHT_CHEV, COLON, COMMA, CRLF, DASH, DELETE, DOLLAR, DOT, DOT_CLASS, DOT_JAVA, EIGHT, EMPTY, EQUALS, FALSE, FILE_SEPARATOR, FIVE, FORWARD_SLASH, FOUR, FULLSTOP, HASH, HAT, INSERT, LEFT_BRACE, LEFT_BRACKET, LEFT_CHEV, MAX_LEN_APPCODE, MAX_LEN_APPGROUP, MAX_LEN_MSGCODE, MAX_LEN_MSGTEXT, MINUS_ONE, N, NEWLINE, NINE, NO, NULL_STRING, OFF, ON, ONE, ONE_DAY, ONE_HOUR, ONE_MINUTE, ONE_WEEK, PATH_SEPARATOR, PERCENT, PIPE, PLUS, QUESTION_MARK, QUOTE, REQUIRED, REQUIRES_NEW, RETURN, RIGHT_BRACE, RIGHT_BRACKET, RIGHT_CHEV, SELECT, SEMICOLON, SEVEN, SINGLE_QUOTE, SIX, SPACE, SQ_LEFT_BRACKET, SQ_RIGHT_BRACKET, SUPPORTS, TEXT_HTML, TEXT_PLAIN, TEXT_XML, THREE, TRUE, TWO, UNDERSCORE, UPDATE, UTF_8, Y, YES, ZERO
 
Constructor Summary
CompositeKey(java.lang.String primaryKey, java.lang.String[] secondaryKeys)
           
 
Method Summary
 boolean equals(java.lang.Object obj)
          returns true if the specified object is the same as this composite
 java.lang.String[] getAllKeys()
          get an array of all keys in this composite.
 java.lang.String getPrimaryKey()
          get the primary key for this composite
 java.lang.String[] getSecondaryKeys()
          get the array of secondary keys for this composite
 void setSecondaryKeys(java.lang.String[] secondaryKeys)
          set the array of secondard keys for this composite
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

CompositeKey

public CompositeKey(java.lang.String primaryKey,
                    java.lang.String[] secondaryKeys)
Method Detail

setSecondaryKeys

public void setSecondaryKeys(java.lang.String[] secondaryKeys)
set the array of secondard keys for this composite


getPrimaryKey

public java.lang.String getPrimaryKey()
get the primary key for this composite


getSecondaryKeys

public java.lang.String[] getSecondaryKeys()
get the array of secondary keys for this composite


getAllKeys

public java.lang.String[] getAllKeys()
get an array of all keys in this composite. Note: the primary key is always the first member of this array


equals

public boolean equals(java.lang.Object obj)
returns true if the specified object is the same as this composite

Overrides:
equals in class java.lang.Object

toString

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