本文整理汇总了Java中com.liferay.portal.kernel.dao.orm.Session.contains方法的典型用法代码示例。如果您正苦于以下问题:Java Session.contains方法的具体用法?Java Session.contains怎么用?Java Session.contains使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.liferay.portal.kernel.dao.orm.Session
的用法示例。
在下文中一共展示了Session.contains方法的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 Business removeImpl(Business business) throws SystemException {
business = toUnwrappedModel(business);
Session session = null;
try {
session = openSession();
if (!session.contains(business)) {
business = (Business)session.get(BusinessImpl.class,
business.getPrimaryKeyObj());
}
if (business != null) {
session.delete(business);
}
}
catch (Exception e) {
throw processException(e);
}
finally {
closeSession(session);
}
if (business != null) {
clearCache(business);
}
return business;
}
示例12: removeImpl
import com.liferay.portal.kernel.dao.orm.Session; //导入方法依赖的package包/类
@Override
protected PaymentFile removeImpl(PaymentFile paymentFile)
throws SystemException {
paymentFile = toUnwrappedModel(paymentFile);
Session session = null;
try {
session = openSession();
if (!session.contains(paymentFile)) {
paymentFile = (PaymentFile)session.get(PaymentFileImpl.class,
paymentFile.getPrimaryKeyObj());
}
if (paymentFile != null) {
session.delete(paymentFile);
}
}
catch (Exception e) {
throw processException(e);
}
finally {
closeSession(session);
}
if (paymentFile != null) {
clearCache(paymentFile);
}
return paymentFile;
}
示例13: removeImpl
import com.liferay.portal.kernel.dao.orm.Session; //导入方法依赖的package包/类
@Override
protected UserAssignment removeImpl(UserAssignment userAssignment)
throws SystemException {
userAssignment = toUnwrappedModel(userAssignment);
Session session = null;
try {
session = openSession();
if (!session.contains(userAssignment)) {
userAssignment = (UserAssignment)session.get(UserAssignmentImpl.class,
userAssignment.getPrimaryKeyObj());
}
if (userAssignment != null) {
session.delete(userAssignment);
}
}
catch (Exception e) {
throw processException(e);
}
finally {
closeSession(session);
}
if (userAssignment != null) {
clearCache(userAssignment);
}
return userAssignment;
}
示例14: removeImpl
import com.liferay.portal.kernel.dao.orm.Session; //导入方法依赖的package包/类
@Override
protected DictMetaData removeImpl(DictMetaData dictMetaData)
throws SystemException {
dictMetaData = toUnwrappedModel(dictMetaData);
Session session = null;
try {
session = openSession();
if (!session.contains(dictMetaData)) {
dictMetaData = (DictMetaData)session.get(DictMetaDataImpl.class,
dictMetaData.getPrimaryKeyObj());
}
if (dictMetaData != null) {
session.delete(dictMetaData);
}
}
catch (Exception e) {
throw processException(e);
}
finally {
closeSession(session);
}
if (dictMetaData != null) {
clearCache(dictMetaData);
}
return dictMetaData;
}
示例15: removeImpl
import com.liferay.portal.kernel.dao.orm.Session; //导入方法依赖的package包/类
@Override
protected Citizen removeImpl(Citizen citizen) throws SystemException {
citizen = toUnwrappedModel(citizen);
Session session = null;
try {
session = openSession();
if (!session.contains(citizen)) {
citizen = (Citizen)session.get(CitizenImpl.class,
citizen.getPrimaryKeyObj());
}
if (citizen != null) {
session.delete(citizen);
}
}
catch (Exception e) {
throw processException(e);
}
finally {
closeSession(session);
}
if (citizen != null) {
clearCache(citizen);
}
return citizen;
}