public List<String> getKeys() { final Entity entity = this.entity; // volatile read return sorted(getEntryStore().getKeys(entity.entityName, entity.entityId)); }
/** * 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 boolean exists(String key) throws PropertyException { final Entity entity = this.entity; // volatile read return getEntryStore().getEntry(entity.entityName, entity.entityId, key) != null; }
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))); }
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(); }
protected PropertySet create() throws Exception { return jiraPropertySetFactory.buildNoncachingPropertySet(PS_KEY, 0L); } };
@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; }
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 void remove() throws PropertyException { final Entity entity = this.entity; // volatile read getEntryStore().removePropertySet(entity.entityName, entity.entityId); }
public void setBoolean(final String key, final boolean value) { doLocked(new Runnable() { @Override public void run() { decoratedPS.setBoolean(key, value); propertySetCache.setBoolean(key, value); } }); }
@SuppressWarnings("NonFinalFieldReferencedInHashCode") // Forced by two-stage construction @Override public int hashCode() { final Entity entity = this.entity; // volatile read return (entity != null) ? entity.hashCode() : 0; }
@Override public boolean equals(final Object o) { return o instanceof CacheKey && equals((CacheKey)o); }
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 List<String> getKeys(int type) { final Entity entity = this.entity; // volatile read return sorted(getEntryStore().getKeys(entity.entityName, entity.entityId, type)); }
public void setInt(final String key, final int value) { doLocked(new Runnable() { @Override public void run() { decoratedPS.setInt(key, value); propertySetCache.setInt(key, value); } }); }
public void setData(final String key, final byte[] value) { doLocked(new Runnable() { @Override public void run() { decoratedPS.setData(key, value); propertySetCache.setData(key, value); } }); }
public void setDate(final String key, final Date value) { doLocked(new Runnable() { @Override public void run() { decoratedPS.setDate(key, value); propertySetCache.setDate(key, value); } }); }
public void setText(final String key, final String value) { doLocked(new Runnable() { @Override public void run() { decoratedPS.setText(key, value); propertySetCache.setText(key, value); } }); }
public void setDouble(final String key, final double value) { doLocked(new Runnable() { @Override public void run() { decoratedPS.setDouble(key, value); propertySetCache.setDouble(key, value); } }); }
public void setLong(final String key, final long value) { doLocked(new Runnable() { @Override public void run() { decoratedPS.setLong(key, value); propertySetCache.setLong(key, value); } }); }