com.liferay.object.model.ObjectLayoutWrapper Maven / Gradle / Ivy
/**
* SPDX-FileCopyrightText: (c) 2000 Liferay, Inc. https://liferay.com
* SPDX-License-Identifier: LGPL-2.1-or-later OR LicenseRef-Liferay-DXP-EULA-2.0.0-2023-06
*/
package com.liferay.object.model;
import com.liferay.exportimport.kernel.lar.StagedModelType;
import com.liferay.portal.kernel.model.ModelWrapper;
import com.liferay.portal.kernel.model.wrapper.BaseModelWrapper;
import java.util.Date;
import java.util.HashMap;
import java.util.Map;
/**
*
* This class is a wrapper for {@link ObjectLayout}.
*
*
* @author Marco Leo
* @see ObjectLayout
* @generated
*/
public class ObjectLayoutWrapper
extends BaseModelWrapper
implements ModelWrapper, ObjectLayout {
public ObjectLayoutWrapper(ObjectLayout objectLayout) {
super(objectLayout);
}
@Override
public Map getModelAttributes() {
Map attributes = new HashMap();
attributes.put("mvccVersion", getMvccVersion());
attributes.put("uuid", getUuid());
attributes.put("objectLayoutId", getObjectLayoutId());
attributes.put("companyId", getCompanyId());
attributes.put("userId", getUserId());
attributes.put("userName", getUserName());
attributes.put("createDate", getCreateDate());
attributes.put("modifiedDate", getModifiedDate());
attributes.put("objectDefinitionId", getObjectDefinitionId());
attributes.put("defaultObjectLayout", isDefaultObjectLayout());
attributes.put("name", getName());
return attributes;
}
@Override
public void setModelAttributes(Map attributes) {
Long mvccVersion = (Long)attributes.get("mvccVersion");
if (mvccVersion != null) {
setMvccVersion(mvccVersion);
}
String uuid = (String)attributes.get("uuid");
if (uuid != null) {
setUuid(uuid);
}
Long objectLayoutId = (Long)attributes.get("objectLayoutId");
if (objectLayoutId != null) {
setObjectLayoutId(objectLayoutId);
}
Long companyId = (Long)attributes.get("companyId");
if (companyId != null) {
setCompanyId(companyId);
}
Long userId = (Long)attributes.get("userId");
if (userId != null) {
setUserId(userId);
}
String userName = (String)attributes.get("userName");
if (userName != null) {
setUserName(userName);
}
Date createDate = (Date)attributes.get("createDate");
if (createDate != null) {
setCreateDate(createDate);
}
Date modifiedDate = (Date)attributes.get("modifiedDate");
if (modifiedDate != null) {
setModifiedDate(modifiedDate);
}
Long objectDefinitionId = (Long)attributes.get("objectDefinitionId");
if (objectDefinitionId != null) {
setObjectDefinitionId(objectDefinitionId);
}
Boolean defaultObjectLayout = (Boolean)attributes.get(
"defaultObjectLayout");
if (defaultObjectLayout != null) {
setDefaultObjectLayout(defaultObjectLayout);
}
String name = (String)attributes.get("name");
if (name != null) {
setName(name);
}
}
@Override
public ObjectLayout cloneWithOriginalValues() {
return wrap(model.cloneWithOriginalValues());
}
@Override
public String[] getAvailableLanguageIds() {
return model.getAvailableLanguageIds();
}
/**
* Returns the company ID of this object layout.
*
* @return the company ID of this object layout
*/
@Override
public long getCompanyId() {
return model.getCompanyId();
}
/**
* Returns the create date of this object layout.
*
* @return the create date of this object layout
*/
@Override
public Date getCreateDate() {
return model.getCreateDate();
}
@Override
public String getDefaultLanguageId() {
return model.getDefaultLanguageId();
}
/**
* Returns the default object layout of this object layout.
*
* @return the default object layout of this object layout
*/
@Override
public boolean getDefaultObjectLayout() {
return model.getDefaultObjectLayout();
}
/**
* Returns the modified date of this object layout.
*
* @return the modified date of this object layout
*/
@Override
public Date getModifiedDate() {
return model.getModifiedDate();
}
/**
* Returns the mvcc version of this object layout.
*
* @return the mvcc version of this object layout
*/
@Override
public long getMvccVersion() {
return model.getMvccVersion();
}
/**
* Returns the name of this object layout.
*
* @return the name of this object layout
*/
@Override
public String getName() {
return model.getName();
}
/**
* Returns the localized name of this object layout in the language. Uses the default language if no localization exists for the requested language.
*
* @param locale the locale of the language
* @return the localized name of this object layout
*/
@Override
public String getName(java.util.Locale locale) {
return model.getName(locale);
}
/**
* Returns the localized name of this object layout in the language, optionally using the default language if no localization exists for the requested language.
*
* @param locale the local of the language
* @param useDefault whether to use the default language if no localization exists for the requested language
* @return the localized name of this object layout. If useDefault
is false
and no localization exists for the requested language, an empty string will be returned.
*/
@Override
public String getName(java.util.Locale locale, boolean useDefault) {
return model.getName(locale, useDefault);
}
/**
* Returns the localized name of this object layout in the language. Uses the default language if no localization exists for the requested language.
*
* @param languageId the ID of the language
* @return the localized name of this object layout
*/
@Override
public String getName(String languageId) {
return model.getName(languageId);
}
/**
* Returns the localized name of this object layout in the language, optionally using the default language if no localization exists for the requested language.
*
* @param languageId the ID of the language
* @param useDefault whether to use the default language if no localization exists for the requested language
* @return the localized name of this object layout
*/
@Override
public String getName(String languageId, boolean useDefault) {
return model.getName(languageId, useDefault);
}
@Override
public String getNameCurrentLanguageId() {
return model.getNameCurrentLanguageId();
}
@Override
public String getNameCurrentValue() {
return model.getNameCurrentValue();
}
/**
* Returns a map of the locales and localized names of this object layout.
*
* @return the locales and localized names of this object layout
*/
@Override
public Map getNameMap() {
return model.getNameMap();
}
/**
* Returns the object definition ID of this object layout.
*
* @return the object definition ID of this object layout
*/
@Override
public long getObjectDefinitionId() {
return model.getObjectDefinitionId();
}
/**
* Returns the object layout ID of this object layout.
*
* @return the object layout ID of this object layout
*/
@Override
public long getObjectLayoutId() {
return model.getObjectLayoutId();
}
@Override
public java.util.List getObjectLayoutTabs() {
return model.getObjectLayoutTabs();
}
/**
* Returns the primary key of this object layout.
*
* @return the primary key of this object layout
*/
@Override
public long getPrimaryKey() {
return model.getPrimaryKey();
}
/**
* Returns the user ID of this object layout.
*
* @return the user ID of this object layout
*/
@Override
public long getUserId() {
return model.getUserId();
}
/**
* Returns the user name of this object layout.
*
* @return the user name of this object layout
*/
@Override
public String getUserName() {
return model.getUserName();
}
/**
* Returns the user uuid of this object layout.
*
* @return the user uuid of this object layout
*/
@Override
public String getUserUuid() {
return model.getUserUuid();
}
/**
* Returns the uuid of this object layout.
*
* @return the uuid of this object layout
*/
@Override
public String getUuid() {
return model.getUuid();
}
/**
* Returns true
if this object layout is default object layout.
*
* @return true
if this object layout is default object layout; false
otherwise
*/
@Override
public boolean isDefaultObjectLayout() {
return model.isDefaultObjectLayout();
}
@Override
public void persist() {
model.persist();
}
@Override
public void prepareLocalizedFieldsForImport()
throws com.liferay.portal.kernel.exception.LocaleException {
model.prepareLocalizedFieldsForImport();
}
@Override
public void prepareLocalizedFieldsForImport(
java.util.Locale defaultImportLocale)
throws com.liferay.portal.kernel.exception.LocaleException {
model.prepareLocalizedFieldsForImport(defaultImportLocale);
}
/**
* Sets the company ID of this object layout.
*
* @param companyId the company ID of this object layout
*/
@Override
public void setCompanyId(long companyId) {
model.setCompanyId(companyId);
}
/**
* Sets the create date of this object layout.
*
* @param createDate the create date of this object layout
*/
@Override
public void setCreateDate(Date createDate) {
model.setCreateDate(createDate);
}
/**
* Sets whether this object layout is default object layout.
*
* @param defaultObjectLayout the default object layout of this object layout
*/
@Override
public void setDefaultObjectLayout(boolean defaultObjectLayout) {
model.setDefaultObjectLayout(defaultObjectLayout);
}
/**
* Sets the modified date of this object layout.
*
* @param modifiedDate the modified date of this object layout
*/
@Override
public void setModifiedDate(Date modifiedDate) {
model.setModifiedDate(modifiedDate);
}
/**
* Sets the mvcc version of this object layout.
*
* @param mvccVersion the mvcc version of this object layout
*/
@Override
public void setMvccVersion(long mvccVersion) {
model.setMvccVersion(mvccVersion);
}
/**
* Sets the name of this object layout.
*
* @param name the name of this object layout
*/
@Override
public void setName(String name) {
model.setName(name);
}
/**
* Sets the localized name of this object layout in the language.
*
* @param name the localized name of this object layout
* @param locale the locale of the language
*/
@Override
public void setName(String name, java.util.Locale locale) {
model.setName(name, locale);
}
/**
* Sets the localized name of this object layout in the language, and sets the default locale.
*
* @param name the localized name of this object layout
* @param locale the locale of the language
* @param defaultLocale the default locale
*/
@Override
public void setName(
String name, java.util.Locale locale, java.util.Locale defaultLocale) {
model.setName(name, locale, defaultLocale);
}
@Override
public void setNameCurrentLanguageId(String languageId) {
model.setNameCurrentLanguageId(languageId);
}
/**
* Sets the localized names of this object layout from the map of locales and localized names.
*
* @param nameMap the locales and localized names of this object layout
*/
@Override
public void setNameMap(Map nameMap) {
model.setNameMap(nameMap);
}
/**
* Sets the localized names of this object layout from the map of locales and localized names, and sets the default locale.
*
* @param nameMap the locales and localized names of this object layout
* @param defaultLocale the default locale
*/
@Override
public void setNameMap(
Map nameMap, java.util.Locale defaultLocale) {
model.setNameMap(nameMap, defaultLocale);
}
/**
* Sets the object definition ID of this object layout.
*
* @param objectDefinitionId the object definition ID of this object layout
*/
@Override
public void setObjectDefinitionId(long objectDefinitionId) {
model.setObjectDefinitionId(objectDefinitionId);
}
/**
* Sets the object layout ID of this object layout.
*
* @param objectLayoutId the object layout ID of this object layout
*/
@Override
public void setObjectLayoutId(long objectLayoutId) {
model.setObjectLayoutId(objectLayoutId);
}
@Override
public void setObjectLayoutTabs(
java.util.List objectLayoutTabs) {
model.setObjectLayoutTabs(objectLayoutTabs);
}
/**
* Sets the primary key of this object layout.
*
* @param primaryKey the primary key of this object layout
*/
@Override
public void setPrimaryKey(long primaryKey) {
model.setPrimaryKey(primaryKey);
}
/**
* Sets the user ID of this object layout.
*
* @param userId the user ID of this object layout
*/
@Override
public void setUserId(long userId) {
model.setUserId(userId);
}
/**
* Sets the user name of this object layout.
*
* @param userName the user name of this object layout
*/
@Override
public void setUserName(String userName) {
model.setUserName(userName);
}
/**
* Sets the user uuid of this object layout.
*
* @param userUuid the user uuid of this object layout
*/
@Override
public void setUserUuid(String userUuid) {
model.setUserUuid(userUuid);
}
/**
* Sets the uuid of this object layout.
*
* @param uuid the uuid of this object layout
*/
@Override
public void setUuid(String uuid) {
model.setUuid(uuid);
}
@Override
public String toXmlString() {
return model.toXmlString();
}
@Override
public StagedModelType getStagedModelType() {
return model.getStagedModelType();
}
@Override
protected ObjectLayoutWrapper wrap(ObjectLayout objectLayout) {
return new ObjectLayoutWrapper(objectLayout);
}
}