pl.edu.agh.cast.data.model.util
Interface IReferenceProvider

All Known Implementing Classes:
ReferenceUtil.DefaultReferenceProvider

public interface IReferenceProvider

Interface of provider of IReference and IReferenceList instances.

Author:
AGH CAST Team
See Also:
IReference, IReferenceList

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.
 

Method Detail

createReference

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

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

createReferenceList

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

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

createReferenceList

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

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

createReferenceList

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

Type Parameters:
T - the type of referenced objects
Parameters:
type - the type of referenced objects
Returns:
a new instance of IReferenceList which is empty

createEmptyReferenceList

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

Type Parameters:
T - the type of referenced objects
Returns:
a new instance of IReferenceList which is empty


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