|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface SyntheticBuilder
A synthetic builder provides a mechanism for creating a user storable from scratch.
The client creates the builder, decorates with properties and indexes on those
properties, then builds.
If additional, ad hoc decoration is desired, the partially constructed classfile
can be retrieved and operated on directly via the ClassFileBuilder
returned by prepare().
| Nested Class Summary | |
|---|---|
static interface |
SyntheticBuilder.ClassNameProvider
Interface used to get the name for the class to generate. |
| Method Summary | |
|---|---|
SyntheticKey |
addAlternateKey()
Add an alternate key to be built. |
SyntheticIndex |
addIndex()
Add an index to the set managed by this builder. |
SyntheticKey |
addPrimaryKey()
Add a primary key to be built. |
SyntheticProperty |
addProperty(String name,
Class type)
Add a property to the set managed by this builder. |
SyntheticProperty |
addProperty(SyntheticProperty prop)
Add an externally defined synthetic property to the list |
Class<? extends Storable> |
build()
Convenience method to generate the class. |
Class<? extends Storable> |
getStorableClass()
|
boolean |
hasProperty(String name)
Check to see if a particular property has already been added to the list of properties to generate |
boolean |
isVersioned()
Returns true if a property with the version attribute has been addded |
ClassFileBuilder |
prepare()
|
| Method Detail |
|---|
ClassFileBuilder prepare()
throws SupportException
ClassFileBuilder ready for further decoration or building
SupportException
Class<? extends Storable> getStorableClass()
throws IllegalStateException
prepare() already have been called
prior to calling this method.
IllegalStateException - if build has not yet been called.
Class<? extends Storable> build()
throws SupportException
prepare() and return the result of
generating the class from that classfile. If the caller does not
wish to regenerate the class from scratch, use getStorableClass() instead.
SupportException
SyntheticProperty addProperty(String name,
Class type)
name - of the propertytype - of the property
SyntheticProperty addProperty(SyntheticProperty prop)
prop - to add
boolean hasProperty(String name)
name - SyntheticKey addPrimaryKey()
SyntheticKey addAlternateKey()
SyntheticIndex addIndex()
boolean isVersioned()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||