@Override
  public final boolean sync(final Map<String, Object> pAddParam,
    final Object pEntity) throws Exception {
    IHasVersion entityPb = (IHasVersion) pEntity;
    IHasVersion entityPbDb = getSrvOrm().retrieveEntity(pAddParam, entityPb);
    boolean isNew = true;
    if (entityPbDb != null) {
      entityPb.setItsVersion(entityPbDb.getItsVersion());
      isNew = false;
    }
    return isNew;
  }
@Override
  public final boolean sync(final Map<String, Object> pAddParam,
    final Object pEntity) throws Exception {
    IHasVersion entityPb = (IHasVersion) pEntity;
    IHasVersion entityPbDb = getSrvOrm().retrieveEntity(pAddParam, entityPb);
    boolean isNew = true;
    if (entityPbDb != null) {
      entityPb.setItsVersion(entityPbDb.getItsVersion());
      isNew = false;
    }
    return isNew;
  }
@ Override public final boolean sync ( final Map < String , Object > pAddParam , final Object pEntity ) throws Exception { IHasVersion entityPb = ( IHasVersion ) pEntity ; IHasVersion entityPbDb = getSrvOrm ( ) . retrieveEntity ( pAddParam , entityPb ) ; boolean isNew = true ; if ( entityPbDb != null ) { entityPb . setItsVersion ( entityPbDb . getItsVersion ( ) ) ; isNew = false ; } return isNew ; }
<p>
Synchronize IHasVersion.
</p>
@param pAddParam additional params
@param pEntity object
@return isNew if entity exist in database (need update)
@throws Exception - an exception
<p > Synchronize IHasVersion . < / p >