|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.amazon.carbonado.info.ChainedProperty<S>
public class ChainedProperty<S extends Storable>
Represents a property to filter on or to order by. Properties may be specified in a simple form, like "firstName", or in a chained form, like "address.state". In both forms, the first property is the "prime" property. All properties that follow are chained.
| Method Summary | ||
|---|---|---|
ChainedProperty<S> |
append(ChainedProperty<?> property)
Returns a new ChainedProperty with another property appended. |
|
ChainedProperty<S> |
append(StorableProperty<?> property)
Returns a new ChainedProperty with another property appended. |
|
ChainedProperty<S> |
append(StorableProperty<?> property,
boolean outerJoin)
Returns a new ChainedProperty with another property appended. |
|
void |
appendTo(Appendable app)
Appends the chained property formatted as "name.subname.subsubname". |
|
boolean |
equals(Object obj)
|
|
static
|
get(StorableProperty<S> prime)
Returns a canonical instance which has no chain. |
|
static
|
get(StorableProperty<S> prime,
StorableProperty<?>... chain)
Returns a canonical instance. |
|
static
|
get(StorableProperty<S> prime,
StorableProperty<?>[] chain,
boolean[] outerJoin)
Returns a canonical instance. |
|
int |
getChainCount()
Returns amount of properties chained from prime property, which may be zero. |
|
StorableProperty<?> |
getChainedProperty(int index)
|
|
StorableProperty<?> |
getLastProperty()
Returns the last property in the chain, or the prime property if chain is empty. |
|
StorableProperty<S> |
getPrimeProperty()
|
|
Class<?> |
getType()
Returns the type of the last property in the chain, or of the prime property if the chain is empty. |
|
int |
hashCode()
|
|
boolean |
isDerived()
Returns true if any property in the chain is derived. |
|
boolean |
isNullable()
Returns true if any property in the chain can be null. |
|
boolean |
isOuterJoin(int index)
Returns true if the property at the given index should be treated as an outer join. |
|
static
|
parse(StorableInfo<S> info,
String str)
Parses a chained property. |
|
ChainedProperty<?> |
tail()
Returns a new ChainedProperty which contains everything that follows this ChainedProperty's prime property. |
|
String |
toString()
Returns the chained property formatted as "name.subname.subsubname". |
|
ChainedProperty<S> |
trim()
Returns a new ChainedProperty with the last property in the chain removed. |
|
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Method Detail |
|---|
public static <S extends Storable> ChainedProperty<S> get(StorableProperty<S> prime)
IllegalArgumentException - if prime is null
public static <S extends Storable> ChainedProperty<S> get(StorableProperty<S> prime,
StorableProperty<?>... chain)
IllegalArgumentException - if prime is null or if chained
properties are not formed properly
public static <S extends Storable> ChainedProperty<S> get(StorableProperty<S> prime,
StorableProperty<?>[] chain,
boolean[] outerJoin)
IllegalArgumentException - if prime is null or if chained
properties are not formed properly
public static <S extends Storable> ChainedProperty<S> parse(StorableInfo<S> info,
String str)
throws IllegalArgumentException
info - Info for Storable type containing propertystr - string to parse
IllegalArgumentException - if any parameter is null or string
format is incorrectpublic StorableProperty<S> getPrimeProperty()
public Class<?> getType()
public boolean isNullable()
Nullablepublic boolean isDerived()
Derivedpublic StorableProperty<?> getLastProperty()
public int getChainCount()
public StorableProperty<?> getChainedProperty(int index)
throws IndexOutOfBoundsException
index - valid range is 0 to chainCount - 1
IndexOutOfBoundsException
public boolean isOuterJoin(int index)
throws IndexOutOfBoundsException
index - valid range is 0 to chainCount
IndexOutOfBoundsExceptionpublic ChainedProperty<S> append(StorableProperty<?> property)
public ChainedProperty<S> append(StorableProperty<?> property,
boolean outerJoin)
outerJoin - pass true for outer joinpublic ChainedProperty<S> append(ChainedProperty<?> property)
public ChainedProperty<S> trim()
IllegalStateException - if chain count is zeropublic ChainedProperty<?> tail()
IllegalStateException - if chain count is zeropublic int hashCode()
hashCode in class Objectpublic boolean equals(Object obj)
equals in class Objectpublic String toString()
toString in class Object
public void appendTo(Appendable app)
throws IOException
appendTo in interface Appenderapp - Appendable object to receive string representation
IOException - if thrown from given Appendable
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||