/** Refresh the Entity for the GenericValue from the persistent store *@param value GenericValue instance containing the entity to refresh */ public void refresh(GenericValue value) throws GenericEntityException { this.refresh(value, true); }
/** Refresh the Entity for the GenericValue from the persistent store *@param value GenericValue instance containing the entity to refresh */ public void refresh(GenericValue value) throws GenericEntityException { this.refresh(value, true); }
@Override public void refresh() throws GenericEntityException { refreshed = true; CoreFactory.getGenericDelegator().refresh(this); }
/** * Refresh the Entity for the GenericValue from the persistent store. * * @param value GenericValue instance containing the entity to refresh */ public void refresh(final GenericValue value) throws GenericEntityException { checkIfLocked(); refresh(value, true); }
public void refresh() throws GenericEntityException { this.getDelegator().refresh(this); }
public void refresh() throws GenericEntityException { this.getDelegator().refresh(this); }
public void refresh() throws GenericEntityException { this.getDelegator().refresh(this); }
GenericValue value = (GenericValue) viter.next(); if (value.lockEnabled()) { refresh(value);
GenericValue value = (GenericValue) viter.next(); if (value.lockEnabled()) { refresh(value);
GenericValue value = viter.next(); if (value.lockEnabled()) { refresh(value);
/** * Store the Entity from the GenericValue to the persistent store. * * @param value GenericValue instance containing the entity * @param doCacheClear whether to automatically clear cache entries related to this operation * @return int representing number of rows affected by this operation */ public int store(final GenericValue value, final boolean doCacheClear) throws GenericEntityException { checkIfLocked(); final GenericHelper helper = getEntityHelper(value.getEntityName()); if (doCacheClear) { // always clear cache before the operation clearCacheLine(value); } final int retVal = helper.store(value); // refresh the valueObject to get the new version if (value.lockEnabled()) { refresh(value, doCacheClear); } return retVal; }
/** * Creates a Entity in the form of a GenericValue and write it to the datasource. * * @param value The GenericValue from which to create a value in the datasource (required) * @param doCacheClear whether to automatically clear cache entries related to this operation * @return GenericValue instance containing the new instance */ public GenericValue create(GenericValue value, final boolean doCacheClear) throws GenericEntityException { checkIfLocked(); final GenericHelper helper = getEntityHelper(value.getEntityName()); value.setDelegator(this); value = helper.create(value); if (value != null) { value.setDelegator(this); if (value.lockEnabled()) { refresh(value, doCacheClear); } else if (doCacheClear) { clearCacheLine(value); } } return value; }
/** Creates a Entity in the form of a GenericValue and write it to the datasource *@param value The GenericValue to create a value in the datasource from *@param doCacheClear boolean that specifies whether or not to automatically clear cache entries related to this operation *@return GenericValue instance containing the new instance */ public GenericValue create(GenericValue value, boolean doCacheClear) throws GenericEntityException { Map ecaEventMap = this.getEcaEntityEventMap(value.getEntityName()); this.evalEcaRules(EntityEcaHandler.EV_VALIDATE, EntityEcaHandler.OP_CREATE, value, ecaEventMap, (ecaEventMap == null), false); if (value == null) { throw new IllegalArgumentException("Cannot create a null value"); } GenericHelper helper = getEntityHelper(value.getEntityName()); this.evalEcaRules(EntityEcaHandler.EV_RUN, EntityEcaHandler.OP_CREATE, value, ecaEventMap, (ecaEventMap == null), false); value.setDelegator(this); value = helper.create(value); if (value != null) { value.setDelegator(this); if (value.lockEnabled()) { refresh(value, doCacheClear); } else { if (doCacheClear) { this.evalEcaRules(EntityEcaHandler.EV_CACHE_CLEAR, EntityEcaHandler.OP_CREATE, value, ecaEventMap, (ecaEventMap == null), false); this.clearCacheLine(value); } } } this.evalEcaRules(EntityEcaHandler.EV_RETURN, EntityEcaHandler.OP_CREATE, value, ecaEventMap, (ecaEventMap == null), false); return value; }
/** Creates a Entity in the form of a GenericValue and write it to the datasource *@param value The GenericValue to create a value in the datasource from *@param doCacheClear boolean that specifies whether or not to automatically clear cache entries related to this operation *@return GenericValue instance containing the new instance */ public GenericValue create(GenericValue value, boolean doCacheClear) throws GenericEntityException { Map ecaEventMap = this.getEcaEntityEventMap(value.getEntityName()); this.evalEcaRules(EntityEcaHandler.EV_VALIDATE, EntityEcaHandler.OP_CREATE, value, ecaEventMap, (ecaEventMap == null), false); if (value == null) { throw new IllegalArgumentException("Cannot create a null value"); } GenericHelper helper = getEntityHelper(value.getEntityName()); this.evalEcaRules(EntityEcaHandler.EV_RUN, EntityEcaHandler.OP_CREATE, value, ecaEventMap, (ecaEventMap == null), false); value.setDelegator(this); value = helper.create(value); if (value != null) { value.setDelegator(this); if (value.lockEnabled()) { refresh(value, doCacheClear); } else { if (doCacheClear) { this.evalEcaRules(EntityEcaHandler.EV_CACHE_CLEAR, EntityEcaHandler.OP_CREATE, value, ecaEventMap, (ecaEventMap == null), false); this.clearCacheLine(value); } } } this.evalEcaRules(EntityEcaHandler.EV_RETURN, EntityEcaHandler.OP_CREATE, value, ecaEventMap, (ecaEventMap == null), false); return value; }
/** Store the Entity from the GenericValue to the persistent store *@param value GenericValue instance containing the entity *@param doCacheClear boolean that specifies whether or not to automatically clear cache entries related to this operation *@return int representing number of rows effected by this operation */ public int store(GenericValue value, boolean doCacheClear) throws GenericEntityException { Map ecaEventMap = this.getEcaEntityEventMap(value.getEntityName()); this.evalEcaRules(EntityEcaHandler.EV_VALIDATE, EntityEcaHandler.OP_STORE, value, ecaEventMap, (ecaEventMap == null), false); GenericHelper helper = getEntityHelper(value.getEntityName()); if (doCacheClear) { // always clear cache before the operation this.evalEcaRules(EntityEcaHandler.EV_CACHE_CLEAR, EntityEcaHandler.OP_STORE, value, ecaEventMap, (ecaEventMap == null), false); this.clearCacheLine(value); } this.evalEcaRules(EntityEcaHandler.EV_RUN, EntityEcaHandler.OP_STORE, value, ecaEventMap, (ecaEventMap == null), false); int retVal = helper.store(value); // refresh the valueObject to get the new version if (value.lockEnabled()) { refresh(value, doCacheClear); } this.evalEcaRules(EntityEcaHandler.EV_RETURN, EntityEcaHandler.OP_STORE, value, ecaEventMap, (ecaEventMap == null), false); return retVal; }
/** Store the Entity from the GenericValue to the persistent store *@param value GenericValue instance containing the entity *@param doCacheClear boolean that specifies whether or not to automatically clear cache entries related to this operation *@return int representing number of rows effected by this operation */ public int store(GenericValue value, boolean doCacheClear) throws GenericEntityException { Map ecaEventMap = this.getEcaEntityEventMap(value.getEntityName()); this.evalEcaRules(EntityEcaHandler.EV_VALIDATE, EntityEcaHandler.OP_STORE, value, ecaEventMap, (ecaEventMap == null), false); GenericHelper helper = getEntityHelper(value.getEntityName()); if (doCacheClear) { // always clear cache before the operation this.evalEcaRules(EntityEcaHandler.EV_CACHE_CLEAR, EntityEcaHandler.OP_STORE, value, ecaEventMap, (ecaEventMap == null), false); this.clearCacheLine(value); } this.evalEcaRules(EntityEcaHandler.EV_RUN, EntityEcaHandler.OP_STORE, value, ecaEventMap, (ecaEventMap == null), false); int retVal = helper.store(value); // refresh the valueObject to get the new version if (value.lockEnabled()) { refresh(value, doCacheClear); } this.evalEcaRules(EntityEcaHandler.EV_RETURN, EntityEcaHandler.OP_STORE, value, ecaEventMap, (ecaEventMap == null), false); return retVal; }