X_CM_Container.java
| Index Score | ||
|---|---|---|
![]() |
![]() |
org.compiere.model |
![]() |
![]() |
Compiere |
View: Reasons, Metrics, Source Code
These are the metrics that contribute to the Enerjy Score for this file, ranked by impact. So the metrics listed at the top influence the score to a greater extent that the metrics listed at the bottom.
/******************************************************************************
* Product: Compiere ERP & CRM Smart Business Solution *
* Copyright (C) 1999-2007 ComPiere, Inc. All Rights Reserved. *
* This program is free software, you can redistribute it and/or modify it *
* under the terms version 2 of the GNU General Public License as published *
* by the Free Software Foundation. This program 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 General Public License for more details. *
* You should have received a copy of the GNU General Public License along *
* with this program, if not, write to the Free Software Foundation, Inc., *
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. *
* For the text or an alternative of this public license, you may reach us *
* ComPiere, Inc., 3600 Bridge Parkway #102, Redwood City, CA 94065, USA *
* or via info@compiere.org or http://www.compiere.org/license.html *
*****************************************************************************/
package org.compiere.model;
/** Generated Model - DO NOT CHANGE */
import java.sql.*;
import java.math.*;
import org.compiere.framework.*;
import org.compiere.util.*;
/** Generated Model for CM_Container
* @author Jorg Janke (generated)
* @version Release 3.1.0 - $Id$ */
public class X_CM_Container extends PO
{
/** Standard Constructor
@param ctx context
@param CM_Container_ID id
@param trxName transaction
*/
public X_CM_Container (Ctx ctx, int CM_Container_ID, String trxName)
{
super (ctx, CM_Container_ID, trxName);
/** if (CM_Container_ID == 0)
{
setCM_Container_ID (0);
setCM_WebProject_ID (0);
setIsIndexed (false);
setIsSecure (false);
setIsSummary (false);
setIsValid (false);
setName (null);
}
*/
}
/** Load Constructor
@param ctx context
@param rs result set
@param trxName transaction
*/
public X_CM_Container (Ctx ctx, ResultSet rs, String trxName)
{
super (ctx, rs, trxName);
}
/** Serial Version No */
static final long serialVersionUID = 27495261242789L;
/** Last Updated Timestamp 2008-06-10 15:12:06.0 */
public static final long updatedMS = 1213135926000L;
/** AD_Table_ID=855 */
public static final int Table_ID=855;
/** TableName=CM_Container */
public static final String Table_Name="CM_Container";
protected static KeyNamePair Model = new KeyNamePair(Table_ID,"CM_Container");
protected BigDecimal accessLevel = new BigDecimal(6);
/** AccessLevel
@return 6 - System - Client
*/
protected int get_AccessLevel()
{
return accessLevel.intValue();
}
/** Load Meta Data
@param ctx context
@return PO Info
*/
protected POInfo initPO (Ctx ctx)
{
POInfo poi = POInfo.getPOInfo (ctx, Table_ID);
return poi;
}
/** Info
@return info
*/
public String toString()
{
StringBuffer sb = new StringBuffer ("X_CM_Container[").append(get_ID()).append("]");
return sb.toString();
}
/** CM_ContainerLink_ID AD_Reference_ID=386 */
public static final int CM_CONTAINERLINK_ID_AD_Reference_ID=386;
/** Set Container Link.
@param CM_ContainerLink_ID Link to another Container in the Web Project */
public void setCM_ContainerLink_ID (int CM_ContainerLink_ID)
{
if (CM_ContainerLink_ID <= 0) set_Value ("CM_ContainerLink_ID", null);
else
set_Value ("CM_ContainerLink_ID", new Integer(CM_ContainerLink_ID));
}
/** Get Container Link.
@return Link to another Container in the Web Project */
public int getCM_ContainerLink_ID()
{
Integer ii = (Integer)get_Value("CM_ContainerLink_ID");
if (ii == null) return 0;
return ii.intValue();
}
/** Set Web Container.
@param CM_Container_ID Web Container contains content like images, text etc. */
public void setCM_Container_ID (int CM_Container_ID)
{
if (CM_Container_ID < 1) throw new IllegalArgumentException ("CM_Container_ID is mandatory.");
set_ValueNoCheck ("CM_Container_ID", new Integer(CM_Container_ID));
}
/** Get Web Container.
@return Web Container contains content like images, text etc. */
public int getCM_Container_ID()
{
Integer ii = (Integer)get_Value("CM_Container_ID");
if (ii == null) return 0;
return ii.intValue();
}
/** Set Template.
@param CM_Template_ID Template defines how content is displayed */
public void setCM_Template_ID (int CM_Template_ID)
{
if (CM_Template_ID <= 0) set_ValueNoCheck ("CM_Template_ID", null);
else
set_ValueNoCheck ("CM_Template_ID", new Integer(CM_Template_ID));
}
/** Get Template.
@return Template defines how content is displayed */
public int getCM_Template_ID()
{
Integer ii = (Integer)get_Value("CM_Template_ID");
if (ii == null) return 0;
return ii.intValue();
}
/** Set Web Project.
@param CM_WebProject_ID A web project is the main data container for Containers, URLs, Ads, and Media etc. */
public void setCM_WebProject_ID (int CM_WebProject_ID)
{
if (CM_WebProject_ID < 1) throw new IllegalArgumentException ("CM_WebProject_ID is mandatory.");
set_ValueNoCheck ("CM_WebProject_ID", new Integer(CM_WebProject_ID));
}
/** Get Web Project.
@return A web project is the main data container for Containers, URLs, Ads, and Media etc. */
public int getCM_WebProject_ID()
{
Integer ii = (Integer)get_Value("CM_WebProject_ID");
if (ii == null) return 0;
return ii.intValue();
}
/** Set External Link (URL).
@param ContainerLinkURL External Link (URL) for the Container */
public void setContainerLinkURL (String ContainerLinkURL)
{
int length = p_info.getFieldLength("ContainerLinkURL");
if (ContainerLinkURL != null && ContainerLinkURL.length() > length)
{
log.warning("Length > " + length + " - truncated");
ContainerLinkURL = ContainerLinkURL.substring(0,length);
}
set_Value ("ContainerLinkURL", ContainerLinkURL);
}
/** Get External Link (URL).
@return External Link (URL) for the Container */
public String getContainerLinkURL()
{
return (String)get_Value("ContainerLinkURL");
}
/** ContainerType AD_Reference_ID=385 */
public static final int CONTAINERTYPE_AD_Reference_ID=385;
/** Document = D */
public static final String CONTAINERTYPE_Document = "D";
/** Internal Link = L */
public static final String CONTAINERTYPE_InternalLink = "L";
/** External URL = U */
public static final String CONTAINERTYPE_ExternalURL = "U";
/** Is test a valid value.
@param test testvalue
@return true if valid **/
public boolean isContainerTypeValid (String test)
{
return test == null || test.equals("D") || test.equals("L") || test.equals("U");
}
/** Set Web Container Type.
@param ContainerType Web Container Type */
public void setContainerType (String ContainerType)
{
if (!isContainerTypeValid(ContainerType))
throw new IllegalArgumentException ("ContainerType Invalid value - " + ContainerType + " - Reference_ID=385 - D - L - U");
int length = p_info.getFieldLength("ContainerType");
if (ContainerType != null && ContainerType.length() > length)
{
log.warning("Length > " + length + " - truncated");
ContainerType = ContainerType.substring(0,length);
}
set_Value ("ContainerType", ContainerType);
}
/** Get Web Container Type.
@return Web Container Type */
public String getContainerType()
{
return (String)get_Value("ContainerType");
}
/** Set ContainerXML.
@param ContainerXML Autogenerated Container definition as XML Code */
public void setContainerXML (String ContainerXML)
{
int length = p_info.getFieldLength("ContainerXML");
if (ContainerXML != null && ContainerXML.length() > length)
{
log.warning("Length > " + length + " - truncated");
ContainerXML = ContainerXML.substring(0,length);
}
set_ValueNoCheck ("ContainerXML", ContainerXML);
}
/** Get ContainerXML.
@return Autogenerated Container definition as XML Code */
public String getContainerXML()
{
return (String)get_Value("ContainerXML");
}
/** Set Description.
@param Description Optional short description of the record */
public void setDescription (String Description)
{
int length = p_info.getFieldLength("Description");
if (Description != null && Description.length() > length)
{
log.warning("Length > " + length + " - truncated");
Description = Description.substring(0,length);
}
set_Value ("Description", Description);
}
/** Get Description.
@return Optional short description of the record */
public String getDescription()
{
return (String)get_Value("Description");
}
/** Set Comment.
@param Help Comment, Help or Hint */
public void setHelp (String Help)
{
int length = p_info.getFieldLength("Help");
if (Help != null && Help.length() > length)
{
log.warning("Length > " + length + " - truncated");
Help = Help.substring(0,length);
}
set_Value ("Help", Help);
}
/** Get Comment.
@return Comment, Help or Hint */
public String getHelp()
{
return (String)get_Value("Help");
}
/** Set Indexed.
@param IsIndexed Index the document for the internal search engine */
public void setIsIndexed (boolean IsIndexed)
{
set_Value ("IsIndexed", new Boolean(IsIndexed));
}
/** Get Indexed.
@return Index the document for the internal search engine */
public boolean isIndexed()
{
Object oo = get_Value("IsIndexed");
if (oo != null)
{
if (oo instanceof Boolean) return ((Boolean)oo).booleanValue();
return "Y".equals(oo);
}
return false;
}
/** Set Secure content.
@param IsSecure Defines whether content needs to get encrypted */
public void setIsSecure (boolean IsSecure)
{
set_Value ("IsSecure", new Boolean(IsSecure));
}
/** Get Secure content.
@return Defines whether content needs to get encrypted */
public boolean isSecure()
{
Object oo = get_Value("IsSecure");
if (oo != null)
{
if (oo instanceof Boolean) return ((Boolean)oo).booleanValue();
return "Y".equals(oo);
}
return false;
}
/** Set Summary Level.
@param IsSummary This is a summary entity */
public void setIsSummary (boolean IsSummary)
{
set_ValueNoCheck ("IsSummary", new Boolean(IsSummary));
}
/** Get Summary Level.
@return This is a summary entity */
public boolean isSummary()
{
Object oo = get_Value("IsSummary");
if (oo != null)
{
if (oo instanceof Boolean) return ((Boolean)oo).booleanValue();
return "Y".equals(oo);
}
return false;
}
/** Set Valid.
@param IsValid Element is valid */
public void setIsValid (boolean IsValid)
{
set_Value ("IsValid", new Boolean(IsValid));
}
/** Get Valid.
@return Element is valid */
public boolean isValid()
{
Object oo = get_Value("IsValid");
if (oo != null)
{
if (oo instanceof Boolean) return ((Boolean)oo).booleanValue();
return "Y".equals(oo);
}
return false;
}
/** Set Meta Author.
@param Meta_Author Author of the content */
public void setMeta_Author (String Meta_Author)
{
int length = p_info.getFieldLength("Meta_Author");
if (Meta_Author != null && Meta_Author.length() > length)
{
log.warning("Length > " + length + " - truncated");
Meta_Author = Meta_Author.substring(0,length);
}
set_Value ("Meta_Author", Meta_Author);
}
/** Get Meta Author.
@return Author of the content */
public String getMeta_Author()
{
return (String)get_Value("Meta_Author");
}
/** Set Meta Content Type.
@param Meta_Content Defines the type of content i.e. "text/html;
charset=UTF-8" */
public void setMeta_Content (String Meta_Content)
{
int length = p_info.getFieldLength("Meta_Content");
if (Meta_Content != null && Meta_Content.length() > length)
{
log.warning("Length > " + length + " - truncated");
Meta_Content = Meta_Content.substring(0,length);
}
set_Value ("Meta_Content", Meta_Content);
}
/** Get Meta Content Type.
@return Defines the type of content i.e. "text/html;
charset=UTF-8" */
public String getMeta_Content()
{
return (String)get_Value("Meta_Content");
}
/** Set Meta Copyright.
@param Meta_Copyright Contains Copyright information for the content */
public void setMeta_Copyright (String Meta_Copyright)
{
int length = p_info.getFieldLength("Meta_Copyright");
if (Meta_Copyright != null && Meta_Copyright.length() > length)
{
log.warning("Length > " + length + " - truncated");
Meta_Copyright = Meta_Copyright.substring(0,length);
}
set_Value ("Meta_Copyright", Meta_Copyright);
}
/** Get Meta Copyright.
@return Contains Copyright information for the content */
public String getMeta_Copyright()
{
return (String)get_Value("Meta_Copyright");
}
/** Set Meta Description.
@param Meta_Description Meta info describing the contents of the page */
public void setMeta_Description (String Meta_Description)
{
int length = p_info.getFieldLength("Meta_Description");
if (Meta_Description != null && Meta_Description.length() > length)
{
log.warning("Length > " + length + " - truncated");
Meta_Description = Meta_Description.substring(0,length);
}
set_Value ("Meta_Description", Meta_Description);
}
/** Get Meta Description.
@return Meta info describing the contents of the page */
public String getMeta_Description()
{
return (String)get_Value("Meta_Description");
}
/** Set Meta Keywords.
@param Meta_Keywords Contains the keywords for the content */
public void setMeta_Keywords (String Meta_Keywords)
{
int length = p_info.getFieldLength("Meta_Keywords");
if (Meta_Keywords != null && Meta_Keywords.length() > length)
{
log.warning("Length > " + length + " - truncated");
Meta_Keywords = Meta_Keywords.substring(0,length);
}
set_Value ("Meta_Keywords", Meta_Keywords);
}
/** Get Meta Keywords.
@return Contains the keywords for the content */
public String getMeta_Keywords()
{
return (String)get_Value("Meta_Keywords");
}
/** Set Meta Language.
@param Meta_Language Language HTML Meta Tag */
public void setMeta_Language (String Meta_Language)
{
int length = p_info.getFieldLength("Meta_Language");
if (Meta_Language != null && Meta_Language.length() > length)
{
log.warning("Length > " + length + " - truncated");
Meta_Language = Meta_Language.substring(0,length);
}
set_Value ("Meta_Language", Meta_Language);
}
/** Get Meta Language.
@return Language HTML Meta Tag */
public String getMeta_Language()
{
return (String)get_Value("Meta_Language");
}
/** Set Meta Publisher.
@param Meta_Publisher Meta Publisher defines the publisher of the content */
public void setMeta_Publisher (String Meta_Publisher)
{
int length = p_info.getFieldLength("Meta_Publisher");
if (Meta_Publisher != null && Meta_Publisher.length() > length)
{
log.warning("Length > " + length + " - truncated");
Meta_Publisher = Meta_Publisher.substring(0,length);
}
set_Value ("Meta_Publisher", Meta_Publisher);
}
/** Get Meta Publisher.
@return Meta Publisher defines the publisher of the content */
public String getMeta_Publisher()
{
return (String)get_Value("Meta_Publisher");
}
/** Set Meta RobotsTag.
@param Meta_RobotsTag RobotsTag defines how search robots should handle this content */
public void setMeta_RobotsTag (String Meta_RobotsTag)
{
int length = p_info.getFieldLength("Meta_RobotsTag");
if (Meta_RobotsTag != null && Meta_RobotsTag.length() > length)
{
log.warning("Length > " + length + " - truncated");
Meta_RobotsTag = Meta_RobotsTag.substring(0,length);
}
set_Value ("Meta_RobotsTag", Meta_RobotsTag);
}
/** Get Meta RobotsTag.
@return RobotsTag defines how search robots should handle this content */
public String getMeta_RobotsTag()
{
return (String)get_Value("Meta_RobotsTag");
}
/** Set Name.
@param Name Alphanumeric identifier of the entity */
public void setName (String Name)
{
if (Name == null) throw new IllegalArgumentException ("Name is mandatory.");
int length = p_info.getFieldLength("Name");
if (Name.length() > length)
{
log.warning("Length > " + length + " - truncated");
Name = Name.substring(0,length);
}
set_Value ("Name", Name);
}
/** Get Name.
@return Alphanumeric identifier of the entity */
public String getName()
{
return (String)get_Value("Name");
}
/** Get Record ID/ColumnName
@return ID/ColumnName pair */
public KeyNamePair getKeyNamePair()
{
return new KeyNamePair(get_ID(), getName());
}
/** Set Relative URL.
@param RelativeURL Contains the relative URL for the container */
public void setRelativeURL (String RelativeURL)
{
int length = p_info.getFieldLength("RelativeURL");
if (RelativeURL != null && RelativeURL.length() > length)
{
log.warning("Length > " + length + " - truncated");
RelativeURL = RelativeURL.substring(0,length);
}
set_Value ("RelativeURL", RelativeURL);
}
/** Get Relative URL.
@return Contains the relative URL for the container */
public String getRelativeURL()
{
return (String)get_Value("RelativeURL");
}
/** Set StructureXML.
@param StructureXML Autogenerated Container definition as XML Code */
public void setStructureXML (String StructureXML)
{
int length = p_info.getFieldLength("StructureXML");
if (StructureXML != null && StructureXML.length() > length)
{
log.warning("Length > " + length + " - truncated");
StructureXML = StructureXML.substring(0,length);
}
set_Value ("StructureXML", StructureXML);
}
/** Get StructureXML.
@return Autogenerated Container definition as XML Code */
public String getStructureXML()
{
return (String)get_Value("StructureXML");
}
/** Set Title.
@param Title Title of the Contact */
public void setTitle (String Title)
{
int length = p_info.getFieldLength("Title");
if (Title != null && Title.length() > length)
{
log.warning("Length > " + length + " - truncated");
Title = Title.substring(0,length);
}
set_Value ("Title", Title);
}
/** Get Title.
@return Title of the Contact */
public String getTitle()
{
return (String)get_Value("Title");
}
}
The table below shows all metrics for X_CM_Container.java.




