Interface UserDefinedPageService
- All Superinterfaces:
Service
public interface UserDefinedPageService extends Service
Service interface which allows you to register features for use within
User-defined Pages.
-
Method Summary
Modifier and Type Method Description SyntheticModel
getSyntheticModel(java.lang.String name)
Returns theSyntheticModel
that is registered with this name ornull
if none is found.java.util.List<SyntheticModel>
getSyntheticModels(java.lang.Class<? extends Model> parentModelClass)
Returns a list of allSyntheticModel
s for the given model class.void
registerSynthetic1to1(SyntheticModel syntheticModel)
Registers a synthetic 1-to-1 relationship between two models that already have a 1-to-many relationship through a model link field.
-
Method Details
-
registerSynthetic1to1
Registers a synthetic 1-to-1 relationship between two models that already have a 1-to-many relationship through a model link field. For example, let's say we have models Classroom and Student. Student has a model link to Classroom, and another field CurrentlyPresenting (which indicates they are presenting something to the classroom). We can create a concept for the Classroom of a Currently Presenting Student by registering a synthetic 1-to-1 relationship:SyntheticModel syntheticModel = new SyntheticModel( "SHOW.CurrentlyPresentingStudent", Classroom.class, Student.class, "SHOW_STUDENT.SYS_CLASSROOM_ID = SHOW_CLASSROOM.SYS_CLASSROOM_ID AND SHOW_STUDENT.CURRENTLY_PRESENTING = 1", syntheticModelListener); udpService.registerSynthetic1to1(syntheticModel);
- Throws:
java.lang.IllegalArgumentException
- if theSyntheticModel.name
is not globally unique.
-
getSyntheticModels
java.util.List<SyntheticModel> getSyntheticModels(java.lang.Class<? extends Model> parentModelClass)Returns a list of allSyntheticModel
s for the given model class.- Parameters:
parentModelClass
-- Returns:
-
getSyntheticModel
Returns theSyntheticModel
that is registered with this name ornull
if none is found.- Parameters:
name
-- Returns:
-