当前位置: 首页>>代码示例>>Java>>正文


Java Session.delete方法代码示例

本文整理汇总了Java中com.liferay.portal.kernel.dao.orm.Session.delete方法的典型用法代码示例。如果您正苦于以下问题:Java Session.delete方法的具体用法?Java Session.delete怎么用?Java Session.delete使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在com.liferay.portal.kernel.dao.orm.Session的用法示例。


在下文中一共展示了Session.delete方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: removeImpl

import com.liferay.portal.kernel.dao.orm.Session; //导入方法依赖的package包/类
@Override
protected DictCollection removeImpl(DictCollection dictCollection) {
	dictCollection = toUnwrappedModel(dictCollection);

	Session session = null;

	try {
		session = openSession();

		if (!session.contains(dictCollection)) {
			dictCollection = (DictCollection)session.get(DictCollectionImpl.class,
					dictCollection.getPrimaryKeyObj());
		}

		if (dictCollection != null) {
			session.delete(dictCollection);
		}
	}
	catch (Exception e) {
		throw processException(e);
	}
	finally {
		closeSession(session);
	}

	if (dictCollection != null) {
		clearCache(dictCollection);
	}

	return dictCollection;
}
 
开发者ID:VietOpenCPS,项目名称:opencps-v2,代码行数:32,代码来源:DictCollectionPersistenceImpl.java

示例2: removeImpl

import com.liferay.portal.kernel.dao.orm.Session; //导入方法依赖的package包/类
@Override
protected Voting removeImpl(Voting voting) {
	voting = toUnwrappedModel(voting);

	Session session = null;

	try {
		session = openSession();

		if (!session.contains(voting)) {
			voting = (Voting)session.get(VotingImpl.class,
					voting.getPrimaryKeyObj());
		}

		if (voting != null) {
			session.delete(voting);
		}
	}
	catch (Exception e) {
		throw processException(e);
	}
	finally {
		closeSession(session);
	}

	if (voting != null) {
		clearCache(voting);
	}

	return voting;
}
 
开发者ID:VietOpenCPS,项目名称:opencps-v2,代码行数:32,代码来源:VotingPersistenceImpl.java

示例3: removeImpl

import com.liferay.portal.kernel.dao.orm.Session; //导入方法依赖的package包/类
@Override
protected VotingResult removeImpl(VotingResult votingResult) {
	votingResult = toUnwrappedModel(votingResult);

	Session session = null;

	try {
		session = openSession();

		if (!session.contains(votingResult)) {
			votingResult = (VotingResult)session.get(VotingResultImpl.class,
					votingResult.getPrimaryKeyObj());
		}

		if (votingResult != null) {
			session.delete(votingResult);
		}
	}
	catch (Exception e) {
		throw processException(e);
	}
	finally {
		closeSession(session);
	}

	if (votingResult != null) {
		clearCache(votingResult);
	}

	return votingResult;
}
 
开发者ID:VietOpenCPS,项目名称:opencps-v2,代码行数:32,代码来源:VotingResultPersistenceImpl.java

示例4: removeImpl

import com.liferay.portal.kernel.dao.orm.Session; //导入方法依赖的package包/类
@Override
protected DictItem removeImpl(DictItem dictItem) {
	dictItem = toUnwrappedModel(dictItem);

	Session session = null;

	try {
		session = openSession();

		if (!session.contains(dictItem)) {
			dictItem = (DictItem)session.get(DictItemImpl.class,
					dictItem.getPrimaryKeyObj());
		}

		if (dictItem != null) {
			session.delete(dictItem);
		}
	}
	catch (Exception e) {
		throw processException(e);
	}
	finally {
		closeSession(session);
	}

	if (dictItem != null) {
		clearCache(dictItem);
	}

	return dictItem;
}
 
开发者ID:VietOpenCPS,项目名称:opencps-v2,代码行数:32,代码来源:DictItemPersistenceImpl.java

示例5: removeImpl

import com.liferay.portal.kernel.dao.orm.Session; //导入方法依赖的package包/类
@Override
protected DictItemGroup removeImpl(DictItemGroup dictItemGroup) {
	dictItemGroup = toUnwrappedModel(dictItemGroup);

	Session session = null;

	try {
		session = openSession();

		if (!session.contains(dictItemGroup)) {
			dictItemGroup = (DictItemGroup)session.get(DictItemGroupImpl.class,
					dictItemGroup.getPrimaryKeyObj());
		}

		if (dictItemGroup != null) {
			session.delete(dictItemGroup);
		}
	}
	catch (Exception e) {
		throw processException(e);
	}
	finally {
		closeSession(session);
	}

	if (dictItemGroup != null) {
		clearCache(dictItemGroup);
	}

	return dictItemGroup;
}
 
开发者ID:VietOpenCPS,项目名称:opencps-v2,代码行数:32,代码来源:DictItemGroupPersistenceImpl.java

示例6: removeImpl

import com.liferay.portal.kernel.dao.orm.Session; //导入方法依赖的package包/类
@Override
protected DictGroup removeImpl(DictGroup dictGroup) {
	dictGroup = toUnwrappedModel(dictGroup);

	Session session = null;

	try {
		session = openSession();

		if (!session.contains(dictGroup)) {
			dictGroup = (DictGroup)session.get(DictGroupImpl.class,
					dictGroup.getPrimaryKeyObj());
		}

		if (dictGroup != null) {
			session.delete(dictGroup);
		}
	}
	catch (Exception e) {
		throw processException(e);
	}
	finally {
		closeSession(session);
	}

	if (dictGroup != null) {
		clearCache(dictGroup);
	}

	return dictGroup;
}
 
开发者ID:VietOpenCPS,项目名称:opencps-v2,代码行数:32,代码来源:DictGroupPersistenceImpl.java

示例7: removeImpl

import com.liferay.portal.kernel.dao.orm.Session; //导入方法依赖的package包/类
@Override
protected Comment removeImpl(Comment comment) {
	comment = toUnwrappedModel(comment);

	Session session = null;

	try {
		session = openSession();

		if (!session.contains(comment)) {
			comment = (Comment)session.get(CommentImpl.class,
					comment.getPrimaryKeyObj());
		}

		if (comment != null) {
			session.delete(comment);
		}
	}
	catch (Exception e) {
		throw processException(e);
	}
	finally {
		closeSession(session);
	}

	if (comment != null) {
		clearCache(comment);
	}

	return comment;
}
 
开发者ID:VietOpenCPS,项目名称:opencps-v2,代码行数:32,代码来源:CommentPersistenceImpl.java

示例8: removeImpl

import com.liferay.portal.kernel.dao.orm.Session; //导入方法依赖的package包/类
@Override
protected Region removeImpl(Region region) {
	region = toUnwrappedModel(region);

	Session session = null;

	try {
		session = openSession();

		if (!session.contains(region)) {
			region = (Region)session.get(RegionImpl.class,
					region.getPrimaryKeyObj());
		}

		if (region != null) {
			session.delete(region);
		}
	}
	catch (Exception e) {
		throw processException(e);
	}
	finally {
		closeSession(session);
	}

	if (region != null) {
		clearCache(region);
	}

	return region;
}
 
开发者ID:liferay,项目名称:liferay-blade-samples,代码行数:32,代码来源:RegionPersistenceImpl.java

示例9: removeImpl

import com.liferay.portal.kernel.dao.orm.Session; //导入方法依赖的package包/类
@Override
protected Country removeImpl(Country country) {
	country = toUnwrappedModel(country);

	Session session = null;

	try {
		session = openSession();

		if (!session.contains(country)) {
			country = (Country)session.get(CountryImpl.class,
					country.getPrimaryKeyObj());
		}

		if (country != null) {
			session.delete(country);
		}
	}
	catch (Exception e) {
		throw processException(e);
	}
	finally {
		closeSession(session);
	}

	if (country != null) {
		clearCache(country);
	}

	return country;
}
 
开发者ID:liferay,项目名称:liferay-blade-samples,代码行数:32,代码来源:CountryPersistenceImpl.java

示例10: removeImpl

import com.liferay.portal.kernel.dao.orm.Session; //导入方法依赖的package包/类
@Override
protected Foo removeImpl(Foo foo) {
	foo = toUnwrappedModel(foo);

	Session session = null;

	try {
		session = openSession();

		if (!session.contains(foo)) {
			foo = (Foo)session.get(FooImpl.class, foo.getPrimaryKeyObj());
		}

		if (foo != null) {
			session.delete(foo);
		}
	}
	catch (Exception e) {
		throw processException(e);
	}
	finally {
		closeSession(session);
	}

	if (foo != null) {
		clearCache(foo);
	}

	return foo;
}
 
开发者ID:liferay,项目名称:liferay-blade-samples,代码行数:31,代码来源:FooPersistenceImpl.java

示例11: removeImpl

import com.liferay.portal.kernel.dao.orm.Session; //导入方法依赖的package包/类
@Override
protected DossierStep2Role removeImpl(DossierStep2Role dossierStep2Role)
	throws SystemException {
	dossierStep2Role = toUnwrappedModel(dossierStep2Role);

	Session session = null;

	try {
		session = openSession();

		if (!session.contains(dossierStep2Role)) {
			dossierStep2Role = (DossierStep2Role)session.get(DossierStep2RoleImpl.class,
					dossierStep2Role.getPrimaryKeyObj());
		}

		if (dossierStep2Role != null) {
			session.delete(dossierStep2Role);
		}
	}
	catch (Exception e) {
		throw processException(e);
	}
	finally {
		closeSession(session);
	}

	if (dossierStep2Role != null) {
		clearCache(dossierStep2Role);
	}

	return dossierStep2Role;
}
 
开发者ID:openegovplatform,项目名称:OEPv2,代码行数:33,代码来源:DossierStep2RolePersistenceImpl.java

示例12: removeImpl

import com.liferay.portal.kernel.dao.orm.Session; //导入方法依赖的package包/类
@Override
protected DossierProc removeImpl(DossierProc dossierProc)
	throws SystemException {
	dossierProc = toUnwrappedModel(dossierProc);

	Session session = null;

	try {
		session = openSession();

		if (!session.contains(dossierProc)) {
			dossierProc = (DossierProc)session.get(DossierProcImpl.class,
					dossierProc.getPrimaryKeyObj());
		}

		if (dossierProc != null) {
			session.delete(dossierProc);
		}
	}
	catch (Exception e) {
		throw processException(e);
	}
	finally {
		closeSession(session);
	}

	if (dossierProc != null) {
		clearCache(dossierProc);
	}

	return dossierProc;
}
 
开发者ID:openegovplatform,项目名称:OEPv2,代码行数:33,代码来源:DossierProcPersistenceImpl.java

示例13: removeImpl

import com.liferay.portal.kernel.dao.orm.Session; //导入方法依赖的package包/类
@Override
protected AHConfig removeImpl(AHConfig ahConfig) throws SystemException {
    ahConfig = toUnwrappedModel(ahConfig);

    Session session = null;

    try {
        session = openSession();

        if (!session.contains(ahConfig)) {
            ahConfig = (AHConfig) session.get(AHConfigImpl.class,
                    ahConfig.getPrimaryKeyObj());
        }

        if (ahConfig != null) {
            session.delete(ahConfig);
        }
    } catch (Exception e) {
        throw processException(e);
    } finally {
        closeSession(session);
    }

    if (ahConfig != null) {
        clearCache(ahConfig);
    }

    return ahConfig;
}
 
开发者ID:fraunhoferfokus,项目名称:particity,代码行数:30,代码来源:AHConfigPersistenceImpl.java

示例14: removeImpl

import com.liferay.portal.kernel.dao.orm.Session; //导入方法依赖的package包/类
@Override
protected StatisticByUser removeImpl(StatisticByUser statisticByUser)
	throws SystemException {
	statisticByUser = toUnwrappedModel(statisticByUser);

	Session session = null;

	try {
		session = openSession();

		if (!session.contains(statisticByUser)) {
			statisticByUser = (StatisticByUser)session.get(StatisticByUserImpl.class,
					statisticByUser.getPrimaryKeyObj());
		}

		if (statisticByUser != null) {
			session.delete(statisticByUser);
		}
	}
	catch (Exception e) {
		throw processException(e);
	}
	finally {
		closeSession(session);
	}

	if (statisticByUser != null) {
		clearCache(statisticByUser);
	}

	return statisticByUser;
}
 
开发者ID:openegovplatform,项目名称:OEPv2,代码行数:33,代码来源:StatisticByUserPersistenceImpl.java

示例15: removeImpl

import com.liferay.portal.kernel.dao.orm.Session; //导入方法依赖的package包/类
@Override
protected DossierFolder removeImpl(DossierFolder dossierFolder)
	throws SystemException {
	dossierFolder = toUnwrappedModel(dossierFolder);

	Session session = null;

	try {
		session = openSession();

		if (!session.contains(dossierFolder)) {
			dossierFolder = (DossierFolder)session.get(DossierFolderImpl.class,
					dossierFolder.getPrimaryKeyObj());
		}

		if (dossierFolder != null) {
			session.delete(dossierFolder);
		}
	}
	catch (Exception e) {
		throw processException(e);
	}
	finally {
		closeSession(session);
	}

	if (dossierFolder != null) {
		clearCache(dossierFolder);
	}

	return dossierFolder;
}
 
开发者ID:openegovplatform,项目名称:OEPv2,代码行数:33,代码来源:DossierFolderPersistenceImpl.java


注:本文中的com.liferay.portal.kernel.dao.orm.Session.delete方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。