Skip to content

Instantly share code, notes, and snippets.

View teja463's full-sized avatar

Brahma Teja Ponnuru teja463

View GitHub Profile
@teja463
teja463 / Sample.java
Created August 14, 2018 12:26
Sampe java hello world program
package sample;
public class Sample{
public static void main(String [] args){
System.out.println("Hello World!!");
}
}
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.
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;
ClassLoader classLoader = (ClassLoader)PortletBeanLocatorUtil.locate(ClpSerializer.getServletContextName(),"portletClassLoader");
DynamicQuery dquery = DynamicQueryFactoryUtil.forClass(Continent.class,classLoader);