LEONARDI Application Composer - 8.9.0.40 by W4 S.A.

leon.peer
Class LyPeerDataProvider

java.lang.Object
  extended by leon.peer.LyDataProvider
      extended by leon.peer.LyPeerDataProvider
Direct Known Subclasses:
LyJavaDataProvider, LyTableDataProvider

public abstract class LyPeerDataProvider
extends LyDataProvider

This class is provided is ease implementations of data providers that use peer classes (LyPeerClass) and peer fields (LyPeerField).

Two methods are abstract and must be implemented by subclasses :

See Also:
LyPeerClass, LyPeerField

Field Summary
static java.lang.String __VERSION
           
 
Constructor Summary
LyPeerDataProvider(LyApplication application, LyLocation location)
          Constructs a peer data provider.
LyPeerDataProvider(LyApplication application, java.lang.String id)
          Deprecated. should use LyDataProvider(LyApplication application, LyLocation location) instead of this constructor.
 
Method Summary
 LyPeerClass getPeerClass(java.lang.String id)
          Retrieves a peer class from its id.
 void invalidate(LyClassInfo classInfo, LyFieldInfo fieldInfo)
          Invalidates the field info of the given class info : this mainly consists to remove the associated peer field.
 void load(LyApplication application, LyPeerDataProvider importProvider, boolean enableReloading)
          Load peer objects coming from given provider.
 void resetPeerClasses()
           
 void validate(LyClassInfo classInfo, LyFieldInfo fieldInfo)
          Validates the field info of the given class info : this mainly consists to create or retrieve the associated peer field.
 boolean validate(LyInfoList<LyClassInfo> classInfos)
          This method is used to build all the class peers for all the classInfos of the location managed by this provider.
 boolean validateNotifier(LyInfoList<LyClassInfo> classInfos)
          Validate the associated event notifier if exists.
 
Methods inherited from class leon.peer.LyDataProvider
canBeFullyLoaded, close, dumpConnections, getApplication, getConnection, getEnvironment, getEventNotifier, getId, getLocation, getNbAvailableConnection, getNbConnection, getRequestEncoder, hasLostConnection, isConnectionReady, isModified, isModified, isNotifierReady, isXASupported, releaseConnection, save, setEventNotifier, setLocation, setModified, setNbConnection, sleep, validate, wakeUp
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

__VERSION

public static final java.lang.String __VERSION
See Also:
Constant Field Values
Constructor Detail

LyPeerDataProvider

public LyPeerDataProvider(LyApplication application,
                          LyLocation location)
Constructs a peer data provider.

Parameters:
application - Current application instance
location - This value is obtained from the location parameter in the meta model.

LyPeerDataProvider

public LyPeerDataProvider(LyApplication application,
                          java.lang.String id)
Deprecated. should use LyDataProvider(LyApplication application, LyLocation location) instead of this constructor.

Constructs a peer data provider.

Parameters:
application - Current application instance
id - Identifier of this data provider.
Method Detail

getPeerClass

public LyPeerClass getPeerClass(java.lang.String id)
Retrieves a peer class from its id.

Parameters:
id - Id of the searched peer class.
Returns:
The peer class if found, null otherwise.

validate

public boolean validate(LyInfoList<LyClassInfo> classInfos)
This method is used to build all the class peers for all the classInfos of the location managed by this provider. Validating a peer data provider consists to :

Overrides:
validate in class LyDataProvider
Parameters:
classInfos - Classes to validate.
Returns:
True if the validation was successful, false otherwise.

validateNotifier

public boolean validateNotifier(LyInfoList<LyClassInfo> classInfos)
Validate the associated event notifier if exists.

Overrides:
validateNotifier in class LyDataProvider
Parameters:
classInfos - Classes to validate.
Returns:
true if the validation was successful.

validate

public void validate(LyClassInfo classInfo,
                     LyFieldInfo fieldInfo)
Validates the field info of the given class info : this mainly consists to create or retrieve the associated peer field.

Parameters:
classInfo - Class info to which the field info belongs to.
fieldInfo - Field info that is validated.

invalidate

public void invalidate(LyClassInfo classInfo,
                       LyFieldInfo fieldInfo)
Invalidates the field info of the given class info : this mainly consists to remove the associated peer field.

Parameters:
classInfo - Class info to which the field info belongs to.
fieldInfo - Field info that is invalidated.

load

public void load(LyApplication application,
                 LyPeerDataProvider importProvider,
                 boolean enableReloading)
Load peer objects coming from given provider.

Parameters:
application - Application on which peer objects are imported.
importProvider - Provider that gives imported objects.
enableReloading - Enable reloading of existing objects.

resetPeerClasses

public void resetPeerClasses()

(c) January 2013 - W4 S.A.

Website: W4 S.A., contact us: support@w4global.com