Package com.liferay.portal.model

Examples of com.liferay.portal.model.BaseModel


    abstract public BaseModel createEntity(Serializable id) throws ValidateException, DBException;

    public T insert(T obj) throws ValidateException, DBException {
        try {
            // TODO: create entity
            BaseModel entity = createEntity(obj.getPrimaryKey());
            setEntityAttributes(entity, obj);
            getPersistence().update(entity, false);
            obj.setNew(false);
            updateManyReference(obj);
            calcFunctionField(obj);
View Full Code Here


        return obj;
    }

    public T update(T obj) throws ValidateException, DBException {
        try {
            BaseModel entity = getPersistence().fetchByPrimaryKey(obj.getPrimaryKey());
            setEntityAttributes(entity, obj);
            getPersistence().update(entity, true);
            updateManyReference(obj);
            calcFunctionField(obj);
        } catch (SystemException e) {
View Full Code Here

        return manager.getCacheEnabled();
    }

    public T get(Object id) throws DBException {
        try {
            BaseModel entity = getPersistence().fetchByPrimaryKey((Serializable) id);
            return newInstance(entity);
        } catch (SystemException e) {
            e.printStackTrace();
        }
        return null;
View Full Code Here

TOP

Related Classes of com.liferay.portal.model.BaseModel

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.