Documentation
Liferay provides a rich store of resources and knowledge to help our community better use and work with our technology.
Value Object
You can add a listener for a specific class by setting the property value.object.listener with a list of comma delimited class names that implement com.liferay.portal.model.ModelListener. These classes are pooled and reused and must be thread safe.
value.object.listener.com.liferay.portal.model.Contact=com.liferay.portal.model.ContactListener
value.object.listener.com.liferay.portal.model.Layout=com.liferay.portal.model.LayoutListener
value.object.listener.com.liferay.portal.model.LayoutSet=com.liferay.portal.model.LayoutSetListener
value.object.listener.com.liferay.portal.model.PortletPreferences=com.liferay.portal.model.PortletPreferencesListener
value.object.listener.com.liferay.portal.model.User=com.liferay.portal.model.UserListener
value.object.listener.com.liferay.portal.model.UserGroup=com.liferay.portal.model.UserGroupListener
value.object.listener.com.liferay.portlet.journal.model.JournalArticle=com.liferay.portlet.journal.model.JournalArticleListener
value.object.listener.com.liferay.portlet.journal.model.JournalTemplate=com.liferay.portlet.journal.model.JournalTemplateListener
Value objects are cached at three levels. They first level is entity, the second level is finder, and the third level is Hibernate.
The entity level cache stores a value object's primary key to the value object itself.
The finder level cache stores the many paths that return a value object and the many paths that return a list of value objects. The finder level cache only caches primary keys and is further helped by the entity level cache that caches the value object to the primary key.
The Hibernate level cache is provided by the hibernate.cache.provider_class property.
Set this to true to enable entity level caching.
value.object.entity.cache.enabled=true
Set this to true to configure entity level caching to block. See the property ehcache.blocking.cache.allowed for more information.
value.object.entity.blocking.cache=true
The entity level cache uses a thread local map to store the most frequently accessed items to lower the number of queries to the underlying cache. Set the maximum map size to 0 to disable the thread level cache.
value.object.entity.thread.local.cache.max.size=100
Entity level caching for a specific type of value object can be configured by using a property name that includes the value object's class name.
value.object.entity.cache.enabled.com.liferay.portal.model.Layout=true
value.object.entity.cache.enabled.com.liferay.portal.model.User=true
Set this to true to enable finder level caching.
value.object.finder.cache.enabled=true
Set this to true to configure finder level caching to block. See the property ehcache.blocking.cache.allowed for more information.
value.object.finder.blocking.cache=true
The finder level cache uses a thread local map to store the most frequently accessed items to lower the number of queries to the underlying cache. Set the maximum map size to 0 to disable the thread level cache.
value.object.finder.thread.local.cache.max.size=100
Finder level caching for a specific type of value object can be configured by using a property name that includes the value object's class name. Mapping tables can also be specified to configure the caching of value object relationships.
value.object.finder.cache.enabled.com.liferay.portal.model.Layout=true
value.object.finder.cache.enabled.com.liferay.portal.model.User=true
value.object.finder.cache.enabled.Users_Roles=true