|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Objectorg.garret.perst.Projection
Class use to project selected objects using relation field. For all selected objects (specified by array or iterator), value of specified field (of IPersistent, array of IPersistent, Link or Relation type) is inspected and all referenced object for projection (duplicate values are eliminated)
| Constructor Summary | |
Projection()
Default constructor of projection. |
|
Projection(java.lang.Class type,
java.lang.String fieldName)
Constructor of projection specified by class and field name of projected objects |
|
| Method Summary | |
java.util.Iterator |
iterator()
Get iterator for result of preceding project and join operations |
void |
join(Projection prj)
Join this projection with another projection. |
void |
project(IPersistent obj)
Project specified object |
void |
project(IPersistent[] selection)
Project specified selection |
void |
project(java.util.Iterator selection)
Project specified selection |
void |
reset()
Reset projection - clear result of prceding project and join operations |
void |
setProjectionField(java.lang.Class type,
java.lang.String fieldName)
Specify class of the projected objects and projection field name |
int |
size()
Get number of objets in the result |
IPersistent[] |
toArray()
Get result of preceding project and join operations |
IPersistent[] |
toArray(IPersistent[] arr)
Get result of preceding project and join operations The runtime type of the returned array is that of the specified array. |
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public Projection()
public Projection(java.lang.Class type,
java.lang.String fieldName)
type - base class for selected objectsfieldName - field name used to perform projection| Method Detail |
public java.util.Iterator iterator()
public void join(Projection prj)
public void project(IPersistent obj)
obj - selected objectpublic void project(IPersistent[] selection)
selection - array with selected objectpublic void project(java.util.Iterator selection)
selection - iterator specifying seleceted objectspublic void reset()
public void setProjectionField(java.lang.Class type,
java.lang.String fieldName)
type - base class for selected objectsfieldName - field name used to perform projectionpublic int size()
public IPersistent[] toArray()
public IPersistent[] toArray(IPersistent[] arr)
If this index fits in the specified array with room to spare (i.e., the array has more elements than this index), the element in the array immediately following the end of the index is set to null. This is useful in determining the length of this index only if the caller knows that this index does not contain any null elements.)
arr - destination array
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||