pl.edu.agh.cast.data.model.util
Class ReferenceUtil.DefaultReferenceProvider

java.lang.Object
  extended by pl.edu.agh.cast.data.model.util.ReferenceUtil.DefaultReferenceProvider
All Implemented Interfaces:
IReferenceProvider
Enclosing class:
ReferenceUtil

protected class ReferenceUtil.DefaultReferenceProvider
extends Object
implements IReferenceProvider

Default implementation of IReferenceProvider which provides Reference instances.

Author:
AGH CAST Team

Constructor Summary
protected ReferenceUtil.DefaultReferenceProvider()
           
 
Method Summary
<T extends Identifiable>
IReferenceList<T>
createEmptyReferenceList()
          Creates an empty reference list of unknown type.
<T extends Identifiable>
IReference<T>
createReference(T instance)
          Creates a reference to the given object.
<T extends Identifiable>
IReferenceList<T>
createReferenceList(Iterable<T> instances, Type type)
          Creates a reference list with a list of objects of the given type.
<T extends Identifiable>
IReferenceList<T>
createReferenceList(T instance)
          Creates a reference list with one object.
<T extends Identifiable>
IReferenceList<T>
createReferenceList(Type type)
          Creates an empty reference list of the given type.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ReferenceUtil.DefaultReferenceProvider

protected ReferenceUtil.DefaultReferenceProvider()
Method Detail

createReference

public <T extends Identifiable> IReference<T> createReference(T instance)
Creates a reference to the given object.

Specified by:
createReference in interface IReferenceProvider
Type Parameters:
T - the type of referenced object
Parameters:
instance - the object to be referenced
Returns:
a new instance of IReference referencing the given object
See Also:
createReference(pl.edu.agh.cast.data.model.Identifiable)

createReferenceList

public <T extends Identifiable> IReferenceList<T> createReferenceList(T instance)
Creates a reference list with one object.

Specified by:
createReferenceList in interface IReferenceProvider
Type Parameters:
T - the type of referenced objects
Parameters:
instance - the object to be referenced
Returns:
a new instance of IReferenceList referencing the given object
See Also:
#createReferenceList(pl.edu.agh.cast.data.model.Identifiable)

createReferenceList

public <T extends Identifiable> IReferenceList<T> createReferenceList(Iterable<T> instances,
                                                                      Type type)
Creates a reference list with a list of objects of the given type.

Specified by:
createReferenceList in interface IReferenceProvider
Type Parameters:
T - the type of referenced objects
Parameters:
instances - a collection of objects to be referenced
type - the type of referenced objects
Returns:
a new instance of IReferenceList referencing the given objects
See Also:
pl.edu.agh.cast.data.model.util.IReferenceProvider#createReferenceList(java.lang.Iterable)

createReferenceList

public <T extends Identifiable> IReferenceList<T> createReferenceList(Type type)
Creates an empty reference list of the given type.

Specified by:
createReferenceList in interface IReferenceProvider
Type Parameters:
T - the type of referenced objects
Parameters:
type - the type of referenced objects
Returns:
a new instance of IReferenceList which is empty
See Also:
IReferenceProvider.createReferenceList(pl.edu.agh.cast.data.model.Type)

createEmptyReferenceList

public <T extends Identifiable> IReferenceList<T> createEmptyReferenceList()
Creates an empty reference list of unknown type.

Specified by:
createEmptyReferenceList in interface IReferenceProvider
Type Parameters:
T - the type of referenced objects
Returns:
a new instance of IReferenceList which is empty
See Also:
IReferenceProvider.createEmptyReferenceList()


Copyright © 2007-2009 IISG AGH-UST Krakow, Poland. All Rights Reserved.