public class ChainedProperty<S extends Storable> extends java.lang.Object implements java.io.Serializable, Appender
| Modifier and Type | Method and Description |
|---|---|
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(java.lang.Appendable app)
Appends the chained property formatted as "name.subname.subsubname".
|
boolean |
equals(java.lang.Object obj) |
static <S extends Storable> |
get(StorableProperty<S> prime)
Returns a canonical instance which has no chain.
|
static <S extends Storable> |
get(StorableProperty<S> prime,
StorableProperty<?>... chain)
Returns a canonical instance.
|
static <S extends Storable> |
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() |
java.lang.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 <S extends Storable> |
parse(StorableInfo<S> info,
java.lang.String str)
Parses a chained property.
|
ChainedProperty<?> |
tail()
Returns a new ChainedProperty which contains everything that follows
this ChainedProperty's prime property.
|
java.lang.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.
|
public static <S extends Storable> ChainedProperty<S> get(StorableProperty<S> prime)
java.lang.IllegalArgumentException - if prime is nullpublic static <S extends Storable> ChainedProperty<S> get(StorableProperty<S> prime, StorableProperty<?>... chain)
java.lang.IllegalArgumentException - if prime is null or if chained
properties are not formed properlypublic static <S extends Storable> ChainedProperty<S> get(StorableProperty<S> prime, StorableProperty<?>[] chain, boolean[] outerJoin)
java.lang.IllegalArgumentException - if prime is null or if chained
properties are not formed properlypublic static <S extends Storable> ChainedProperty<S> parse(StorableInfo<S> info, java.lang.String str) throws java.lang.IllegalArgumentException
info - Info for Storable type containing propertystr - string to parsejava.lang.IllegalArgumentException - if any parameter is null or string
format is incorrectpublic StorableProperty<S> getPrimeProperty()
public java.lang.Class<?> getType()
public boolean isNullable()
Nullablepublic boolean isDerived()
Derivedpublic StorableProperty<?> getLastProperty()
public int getChainCount()
public StorableProperty<?> getChainedProperty(int index) throws java.lang.IndexOutOfBoundsException
index - valid range is 0 to chainCount - 1java.lang.IndexOutOfBoundsExceptionpublic boolean isOuterJoin(int index)
throws java.lang.IndexOutOfBoundsException
index - valid range is 0 to chainCountjava.lang.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()
java.lang.IllegalStateException - if chain count is zeropublic ChainedProperty<?> tail()
java.lang.IllegalStateException - if chain count is zeropublic int hashCode()
hashCode in class java.lang.Objectpublic boolean equals(java.lang.Object obj)
equals in class java.lang.Objectpublic java.lang.String toString()
toString in class java.lang.Objectpublic void appendTo(java.lang.Appendable app)
throws java.io.IOException
Copyright © 2006-2013 Amazon Technologies, Inc.. All Rights Reserved.