@Nonnull public PropertySet buildCachingDefaultPropertySet(final String entityName, final boolean bulkLoad) { return buildCachingPropertySet(entityName, DEFAULT_ENTITY_ID); }
@Nonnull public PropertySet buildNoncachingPropertySet(final String entityName) { return buildNoncachingPropertySet(entityName, DEFAULT_ENTITY_ID); }
@Nonnull public PropertySet buildMemoryPropertySet(final String entityName, final Long entityId) { final PropertySet dbPropertySet = buildNoncachingPropertySet(entityName, entityId); final PropertySet memoryPropertySet = createPropertySet("memory", Maps.<String,Object>newHashMap()); // Clone the property set. PropertySetManager.clone(dbPropertySet, memoryPropertySet); return memoryPropertySet; }
@Nonnull public PropertySet buildNoncachingPropertySet(final String entityName, final Long entityId) { return createPropertySet("ofbiz", FieldMap.build( "delegator.name", "default", "entityName", entityName, "entityId", entityId)); }
@Nonnull private PropertySet createPropertySet(final String propertySetDelegator, final Map<String,Object> ofbizArgs) { final Class<? extends PropertySet> implClass = IMPLEMENTATIONS.get(propertySetDelegator); if (implClass != null) { // Avoid using slower PropertySetManager.getInstance if possible return createPropertySet(implClass, ofbizArgs); } return PropertySetManager.getInstance(propertySetDelegator, ofbizArgs, classLoader); }
@Nonnull public PropertySet buildCachingDefaultPropertySet(final String entityName) { return buildCachingPropertySet(entityName, DEFAULT_ENTITY_ID); }
@Nonnull public PropertySet buildCachingPropertySet(final PropertySet propertySet, final boolean bulkLoad) { notNull("propertySet is a required parameter", propertySet); final PropertySet cachingPropertySet = createPropertySet("cached", FieldMap.build( "PropertySet", propertySet, "bulkload", bulkLoad)); if (cachingPropertySet instanceof JiraCachingPropertySet) { //noinspection CastToConcreteClass jiraCachingPropertySetManager.register((JiraCachingPropertySet) cachingPropertySet); } return cachingPropertySet; }
@Nonnull public PropertySet buildCachingPropertySet(final String entityName, final Long entityId, final boolean bulkLoad) { return buildCachingPropertySet(entityName, entityId); }