public boolean exists(String key) throws PropertyException { final Entity entity = this.entity; // volatile read return getEntryStore().getEntry(entity.entityName, entity.entityId, key) != null; }
/** * Implementation note: Unlike {@code OFBizPropertySet}, this implementation will <em>not</em> throw * an exception if the property does not exist. * * @param key the key of the property to be removed * @throws PropertyException if the attempt to remove an existing property fails at the persistence layer */ public void remove(String key) { final Entity entity = this.entity; // volatile read getEntryStore().removeEntry(entity.entityName, entity.entityId, key); }
public void remove() throws PropertyException { final Entity entity = this.entity; // volatile read getEntryStore().removePropertySet(entity.entityName, entity.entityId); }
public List<String> getKeys() { final Entity entity = this.entity; // volatile read return sorted(getEntryStore().getKeys(entity.entityName, entity.entityId)); }
protected void setImpl(int type, String key, Object obj) { final Entity entity = this.entity; // volatile read getEntryStore().setEntry(entity.entityName, entity.entityId, key, type, obj); }
public List<String> getKeys(int type) { final Entity entity = this.entity; // volatile read return sorted(getEntryStore().getKeys(entity.entityName, entity.entityId, type)); }
public List<String> getKeys(final String prefix) { final Entity entity = this.entity; // volatile read return sorted(filter(getEntryStore().getKeys(entity.entityName, entity.entityId), new StartsWith(prefix))); }
@Nullable protected Object get(int type, String key) { final Entity entity = this.entity; // volatile read final PropertyEntry entry = getEntryStore().getEntry(entity.entityName, entity.entityId, key); return (entry != null) ? entry.getValue(type) : null; }
public List<String> getKeys(String prefix, int type) { final Entity entity = this.entity; // volatile read return sorted(filter(getEntryStore().getKeys(entity.entityName, entity.entityId, type), new StartsWith(prefix))); }
public int getType(String key) throws PropertyException { final Entity entity = this.entity; // volatile read final PropertyEntry entry = getEntryStore().getEntry(entity.entityName, entity.entityId, key); if (entry == null) { throw new PropertyImplementationException("Property '" + key + "' not found"); } return entry.getType(); }