All Downloads are FREE. Search and download functionalities are using the official Maven repository.

as.leap.code.impl.LASClassManagerHookBase Maven / Gradle / Ivy

package as.leap.code.impl;


import as.leap.code.*;
import as.leap.las.sdk.DeleteMsg;
import as.leap.las.sdk.SaveMsg;
import as.leap.las.sdk.UpdateMsg;

/**
 * User:poplar
 * Date:14-10-28
 */
public abstract class LASClassManagerHookBase implements LASClassManagerHook {

  @Override
  public BeforeResult beforeCreate(T entity) {
    return new BeforeResult(entity, true);
  }

  @Override
  public AfterResult afterCreate(BeforeResult beforeResult, SaveMsg saveMessage) {
    AfterResult afterResult = new AfterResult(saveMessage);
    return afterResult;
  }

  @Override
  public BeforeResult beforeDelete(String objectId) {
    return new BeforeResult(objectId, true);
  }

  @Override
  public AfterResult afterDelete(BeforeResult beforeResult, DeleteMsg deleteMessage) {
    AfterResult afterResult = new AfterResult(deleteMessage);
    return afterResult;
  }

  @Override
  public AfterResult afterUpdate(String objectId, UpdateMsg updateMessage) {
    AfterResult afterResult = new AfterResult(updateMessage);
    return afterResult;
  }

  @Override
  public BeforeResult beforeDelete(String[] objectIds) {
    return new BeforeResult(objectIds, true);
  }

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy