This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ClassLoader classLoader = (ClassLoader)PortletBeanLocatorUtil.locate(ClpSerializer.getServletContextName(),"portletClassLoader"); | |
DynamicQuery dquery = DynamicQueryFactoryUtil.forClass(Continent.class,classLoader); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.sample.service.service.impl; | |
import com.liferay.portal.kernel.cache.MultiVMPoolUtil; | |
import com.liferay.portal.kernel.cache.PortalCache; | |
import com.liferay.portal.kernel.log.Log; | |
import com.liferay.portal.kernel.log.LogFactoryUtil; | |
import com.liferay.portal.kernel.util.Validator; | |
import com.sample.service.service.base.StudentServiceBaseImpl; | |
import java.io.Serializable; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class { | |
public static void main(String[] args){ | |
PortalCache<Serializable, Object> cache = SingleVMPoolUtil.getCache("testCache"); | |
// Adding values in to cache. | |
cache.put("LR","Liferay"); | |
cache.put("WPS", "WebSphere Portal Server"); | |
// Retrieving values from cache. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package sample; | |
public class Sample{ | |
public static void main(String [] args){ | |
System.out.println("Hello World!!"); | |
} | |
} |