forked from liferay/liferay-portal
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
b554eb8
commit 948e702
Showing
30 changed files
with
9,682 additions
and
0 deletions.
There are no files selected for viewing
603 changes: 603 additions & 0 deletions
603
...va/com/liferay/portal/service/persistence/test/PortletPreferenceValuePersistenceTest.java
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
52 changes: 52 additions & 0 deletions
52
portal-impl/src/com/liferay/portal/model/impl/PortletPreferenceValueBaseImpl.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
/** | ||
* Copyright (c) 2000-present Liferay, Inc. All rights reserved. | ||
* | ||
* This library is free software; you can redistribute it and/or modify it under | ||
* the terms of the GNU Lesser General Public License as published by the Free | ||
* Software Foundation; either version 2.1 of the License, or (at your option) | ||
* any later version. | ||
* | ||
* This library is distributed in the hope that it will be useful, but WITHOUT | ||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS | ||
* FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more | ||
* details. | ||
*/ | ||
|
||
package com.liferay.portal.model.impl; | ||
|
||
import com.liferay.portal.kernel.model.PortletPreferenceValue; | ||
import com.liferay.portal.kernel.service.PortletPreferenceValueLocalServiceUtil; | ||
|
||
/** | ||
* The extended model base implementation for the PortletPreferenceValue service. Represents a row in the "PortletPreferenceValue" database table, with each column mapped to a property of this class. | ||
* | ||
* <p> | ||
* This class exists only as a container for the default extended model level methods generated by ServiceBuilder. Helper methods and all application logic should be put in {@link PortletPreferenceValueImpl}. | ||
* </p> | ||
* | ||
* @author Brian Wing Shun Chan | ||
* @see PortletPreferenceValueImpl | ||
* @see PortletPreferenceValue | ||
* @generated | ||
*/ | ||
public abstract class PortletPreferenceValueBaseImpl | ||
extends PortletPreferenceValueModelImpl implements PortletPreferenceValue { | ||
|
||
/* | ||
* NOTE FOR DEVELOPERS: | ||
* | ||
* Never modify or reference this class directly. All methods that expect a portlet preference value model instance should use the <code>PortletPreferenceValue</code> interface instead. | ||
*/ | ||
@Override | ||
public void persist() { | ||
if (this.isNew()) { | ||
PortletPreferenceValueLocalServiceUtil.addPortletPreferenceValue( | ||
this); | ||
} | ||
else { | ||
PortletPreferenceValueLocalServiceUtil.updatePortletPreferenceValue( | ||
this); | ||
} | ||
} | ||
|
||
} |
218 changes: 218 additions & 0 deletions
218
portal-impl/src/com/liferay/portal/model/impl/PortletPreferenceValueCacheModel.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,218 @@ | ||
/** | ||
* Copyright (c) 2000-present Liferay, Inc. All rights reserved. | ||
* | ||
* This library is free software; you can redistribute it and/or modify it under | ||
* the terms of the GNU Lesser General Public License as published by the Free | ||
* Software Foundation; either version 2.1 of the License, or (at your option) | ||
* any later version. | ||
* | ||
* This library is distributed in the hope that it will be useful, but WITHOUT | ||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS | ||
* FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more | ||
* details. | ||
*/ | ||
|
||
package com.liferay.portal.model.impl; | ||
|
||
import com.liferay.petra.lang.HashUtil; | ||
import com.liferay.petra.string.StringBundler; | ||
import com.liferay.portal.kernel.model.CacheModel; | ||
import com.liferay.portal.kernel.model.MVCCModel; | ||
import com.liferay.portal.kernel.model.PortletPreferenceValue; | ||
|
||
import java.io.Externalizable; | ||
import java.io.IOException; | ||
import java.io.ObjectInput; | ||
import java.io.ObjectOutput; | ||
|
||
/** | ||
* The cache model class for representing PortletPreferenceValue in entity cache. | ||
* | ||
* @author Brian Wing Shun Chan | ||
* @generated | ||
*/ | ||
public class PortletPreferenceValueCacheModel | ||
implements CacheModel<PortletPreferenceValue>, Externalizable, MVCCModel { | ||
|
||
@Override | ||
public boolean equals(Object object) { | ||
if (this == object) { | ||
return true; | ||
} | ||
|
||
if (!(object instanceof PortletPreferenceValueCacheModel)) { | ||
return false; | ||
} | ||
|
||
PortletPreferenceValueCacheModel portletPreferenceValueCacheModel = | ||
(PortletPreferenceValueCacheModel)object; | ||
|
||
if ((portletPreferenceValueId == | ||
portletPreferenceValueCacheModel.portletPreferenceValueId) && | ||
(mvccVersion == portletPreferenceValueCacheModel.mvccVersion)) { | ||
|
||
return true; | ||
} | ||
|
||
return false; | ||
} | ||
|
||
@Override | ||
public int hashCode() { | ||
int hashCode = HashUtil.hash(0, portletPreferenceValueId); | ||
|
||
return HashUtil.hash(hashCode, mvccVersion); | ||
} | ||
|
||
@Override | ||
public long getMvccVersion() { | ||
return mvccVersion; | ||
} | ||
|
||
@Override | ||
public void setMvccVersion(long mvccVersion) { | ||
this.mvccVersion = mvccVersion; | ||
} | ||
|
||
@Override | ||
public String toString() { | ||
StringBundler sb = new StringBundler(21); | ||
|
||
sb.append("{mvccVersion="); | ||
sb.append(mvccVersion); | ||
sb.append(", ctCollectionId="); | ||
sb.append(ctCollectionId); | ||
sb.append(", portletPreferenceValueId="); | ||
sb.append(portletPreferenceValueId); | ||
sb.append(", companyId="); | ||
sb.append(companyId); | ||
sb.append(", portletPreferencesId="); | ||
sb.append(portletPreferencesId); | ||
sb.append(", name="); | ||
sb.append(name); | ||
sb.append(", index="); | ||
sb.append(index); | ||
sb.append(", smallValue="); | ||
sb.append(smallValue); | ||
sb.append(", largeValue="); | ||
sb.append(largeValue); | ||
sb.append(", readOnly="); | ||
sb.append(readOnly); | ||
sb.append("}"); | ||
|
||
return sb.toString(); | ||
} | ||
|
||
@Override | ||
public PortletPreferenceValue toEntityModel() { | ||
PortletPreferenceValueImpl portletPreferenceValueImpl = | ||
new PortletPreferenceValueImpl(); | ||
|
||
portletPreferenceValueImpl.setMvccVersion(mvccVersion); | ||
portletPreferenceValueImpl.setCtCollectionId(ctCollectionId); | ||
portletPreferenceValueImpl.setPortletPreferenceValueId( | ||
portletPreferenceValueId); | ||
portletPreferenceValueImpl.setCompanyId(companyId); | ||
portletPreferenceValueImpl.setPortletPreferencesId( | ||
portletPreferencesId); | ||
|
||
if (name == null) { | ||
portletPreferenceValueImpl.setName(""); | ||
} | ||
else { | ||
portletPreferenceValueImpl.setName(name); | ||
} | ||
|
||
portletPreferenceValueImpl.setIndex(index); | ||
|
||
if (smallValue == null) { | ||
portletPreferenceValueImpl.setSmallValue(""); | ||
} | ||
else { | ||
portletPreferenceValueImpl.setSmallValue(smallValue); | ||
} | ||
|
||
if (largeValue == null) { | ||
portletPreferenceValueImpl.setLargeValue(""); | ||
} | ||
else { | ||
portletPreferenceValueImpl.setLargeValue(largeValue); | ||
} | ||
|
||
portletPreferenceValueImpl.setReadOnly(readOnly); | ||
|
||
portletPreferenceValueImpl.resetOriginalValues(); | ||
|
||
return portletPreferenceValueImpl; | ||
} | ||
|
||
@Override | ||
public void readExternal(ObjectInput objectInput) throws IOException { | ||
mvccVersion = objectInput.readLong(); | ||
|
||
ctCollectionId = objectInput.readLong(); | ||
|
||
portletPreferenceValueId = objectInput.readLong(); | ||
|
||
companyId = objectInput.readLong(); | ||
|
||
portletPreferencesId = objectInput.readLong(); | ||
name = objectInput.readUTF(); | ||
|
||
index = objectInput.readInt(); | ||
smallValue = objectInput.readUTF(); | ||
largeValue = objectInput.readUTF(); | ||
|
||
readOnly = objectInput.readBoolean(); | ||
} | ||
|
||
@Override | ||
public void writeExternal(ObjectOutput objectOutput) throws IOException { | ||
objectOutput.writeLong(mvccVersion); | ||
|
||
objectOutput.writeLong(ctCollectionId); | ||
|
||
objectOutput.writeLong(portletPreferenceValueId); | ||
|
||
objectOutput.writeLong(companyId); | ||
|
||
objectOutput.writeLong(portletPreferencesId); | ||
|
||
if (name == null) { | ||
objectOutput.writeUTF(""); | ||
} | ||
else { | ||
objectOutput.writeUTF(name); | ||
} | ||
|
||
objectOutput.writeInt(index); | ||
|
||
if (smallValue == null) { | ||
objectOutput.writeUTF(""); | ||
} | ||
else { | ||
objectOutput.writeUTF(smallValue); | ||
} | ||
|
||
if (largeValue == null) { | ||
objectOutput.writeUTF(""); | ||
} | ||
else { | ||
objectOutput.writeUTF(largeValue); | ||
} | ||
|
||
objectOutput.writeBoolean(readOnly); | ||
} | ||
|
||
public long mvccVersion; | ||
public long ctCollectionId; | ||
public long portletPreferenceValueId; | ||
public long companyId; | ||
public long portletPreferencesId; | ||
public String name; | ||
public int index; | ||
public String smallValue; | ||
public String largeValue; | ||
public boolean readOnly; | ||
|
||
} |
36 changes: 36 additions & 0 deletions
36
portal-impl/src/com/liferay/portal/model/impl/PortletPreferenceValueImpl.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
/** | ||
* Copyright (c) 2000-present Liferay, Inc. All rights reserved. | ||
* | ||
* This library is free software; you can redistribute it and/or modify it under | ||
* the terms of the GNU Lesser General Public License as published by the Free | ||
* Software Foundation; either version 2.1 of the License, or (at your option) | ||
* any later version. | ||
* | ||
* This library is distributed in the hope that it will be useful, but WITHOUT | ||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS | ||
* FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more | ||
* details. | ||
*/ | ||
|
||
package com.liferay.portal.model.impl; | ||
|
||
/** | ||
* The extended model implementation for the PortletPreferenceValue service. Represents a row in the "PortletPreferenceValue" database table, with each column mapped to a property of this class. | ||
* | ||
* <p> | ||
* Helper methods and all application logic should be put in this class. Whenever methods are added, rerun ServiceBuilder to copy their definitions into the <code>com.liferay.portal.kernel.model.PortletPreferenceValue</code> interface. | ||
* </p> | ||
* | ||
* @author Brian Wing Shun Chan | ||
*/ | ||
public class PortletPreferenceValueImpl extends PortletPreferenceValueBaseImpl { | ||
|
||
/* | ||
* NOTE FOR DEVELOPERS: | ||
* | ||
* Never reference this class directly. All methods that expect a portlet preference value model instance should use the {@link com.liferay.portal.kernel.model.PortletPreferenceValue} interface instead. | ||
*/ | ||
public PortletPreferenceValueImpl() { | ||
} | ||
|
||
} |
Oops, something went wrong.