本文整理汇总了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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}