📄 websitedata.java
字号:
* @ejb:persistent-field * @hibernate.property column="emailfromaddress" non-null="true" unique="false" */ public java.lang.String getEmailFromAddress() { return this.emailFromAddress; } /** @ejb:persistent-field */ public void setEmailFromAddress(java.lang.String emailFromAddress) { this.emailFromAddress = emailFromAddress; } /** * EditorTheme of the Website. * @ejb:persistent-field * @hibernate.property column="editortheme" non-null="true" unique="false" */ public java.lang.String getEditorTheme() { return this.editorTheme; } /** @ejb:persistent-field */ public void setEditorTheme(java.lang.String editorTheme) { this.editorTheme = editorTheme; } /** * Locale of the Website. * @ejb:persistent-field * @hibernate.property column="locale" non-null="true" unique="false" */ public java.lang.String getLocale() { return this.locale; } /** @ejb:persistent-field */ public void setLocale(java.lang.String locale) { this.locale = locale; } /** * Timezone of the Website. * @ejb:persistent-field * @hibernate.property column="timezone" non-null="true" unique="false" */ public java.lang.String getTimezone() { return this.timezone; } /** @ejb:persistent-field */ public void setTimezone(java.lang.String timezone) { this.timezone = timezone; } /** * Comma-delimited list of user's default Plugins. * @ejb:persistent-field * @hibernate.property column="defaultplugins" non-null="false" unique="false" */ public java.lang.String getDefaultPlugins() { return mDefaultPlugins; } /** @ejb:persistent-field */ public void setDefaultPlugins(java.lang.String string) { mDefaultPlugins = string; } /** * @ejb:persistent-field * @hibernate.property column="isenabled" non-null="true" unique="false" */ public java.lang.Boolean getIsEnabled() { return this.isEnabled; } /** @ejb:persistent-field */ public void setIsEnabled(java.lang.Boolean isEnabled) { this.isEnabled = isEnabled; } public String toString() { StringBuffer str = new StringBuffer("{"); str.append("id=" + id + " " + "name=" + name + " " + "description=" + description + " " + "defaultPageId=" + defaultPageId + " " + "weblogDayPageId=" + weblogDayPageId + " " + "enableBloggerApi=" + enableBloggerApi + " " + "bloggerCategory=" + bloggerCategory + " " + "defaultCategory=" + defaultCategory + " " + "editorPage=" + editorPage + " " + "ignoreWords=" + ignoreWords + " " + "allowComments=" + allowComments + " " + "emailComments=" + emailComments + " " + "emailFromAddress=" + emailFromAddress + " " + "editorTheme=" + editorTheme + " " + "locale=" + locale + " " + "timezone=" + timezone + " " + "defaultPlugins=" + mDefaultPlugins); str.append('}'); return (str.toString()); } public boolean equals(Object pOther) { if (pOther instanceof WebsiteData) { WebsiteData lTest = (WebsiteData) pOther; boolean lEquals = true; lEquals = PojoUtil.equals(lEquals, this.id, lTest.id); lEquals = PojoUtil.equals(lEquals, this.name, lTest.name); lEquals = PojoUtil.equals(lEquals, this.description, lTest.description); lEquals = PojoUtil.equals(lEquals, this.mUser, lTest.mUser); lEquals = PojoUtil.equals(lEquals, this.defaultPageId, lTest.defaultPageId); lEquals = PojoUtil.equals(lEquals, this.weblogDayPageId, lTest.weblogDayPageId); lEquals = PojoUtil.equals(lEquals, this.enableBloggerApi, lTest.enableBloggerApi); lEquals = PojoUtil.equals(lEquals, this.bloggerCategory.getId(), lTest.bloggerCategory.getId()); lEquals = PojoUtil.equals(lEquals, this.defaultCategory.getId(), lTest.defaultCategory.getId()); lEquals = PojoUtil.equals(lEquals, this.editorPage, lTest.editorPage); lEquals = PojoUtil.equals(lEquals, this.ignoreWords, lTest.ignoreWords); lEquals = PojoUtil.equals(lEquals, this.allowComments, lTest.allowComments); lEquals = PojoUtil.equals(lEquals, this.emailComments, lTest.emailComments); lEquals = PojoUtil.equals(lEquals, this.emailFromAddress, lTest.emailFromAddress); lEquals = PojoUtil.equals(lEquals, this.editorTheme, lTest.editorTheme); lEquals = PojoUtil.equals(lEquals, this.locale, lTest.locale); lEquals = PojoUtil.equals(lEquals, this.timezone, lTest.timezone); lEquals = PojoUtil.equals(lEquals, this.mDefaultPlugins, lTest.mDefaultPlugins); return lEquals; } else { return false; } } public int hashCode() { int result = 17; result = PojoUtil.addHashCode(result, this.id); result = PojoUtil.addHashCode(result, this.name); result = PojoUtil.addHashCode(result, this.description); result = PojoUtil.addHashCode(result, this.mUser); result = PojoUtil.addHashCode(result, this.defaultPageId); result = PojoUtil.addHashCode(result, this.weblogDayPageId); result = PojoUtil.addHashCode(result, this.enableBloggerApi); //result = PojoUtil.addHashCode(result, this.bloggerCategory); //result = PojoUtil.addHashCode(result, this.defaultCategory); result = PojoUtil.addHashCode(result, this.editorPage); result = PojoUtil.addHashCode(result, this.ignoreWords); result = PojoUtil.addHashCode(result, this.allowComments); result = PojoUtil.addHashCode(result, this.emailComments); result = PojoUtil.addHashCode(result, this.emailFromAddress); result = PojoUtil.addHashCode(result, this.editorTheme); result = PojoUtil.addHashCode(result, this.locale); result = PojoUtil.addHashCode(result, this.timezone); result = PojoUtil.addHashCode(result, this.mDefaultPlugins); return result; } /** * Setter is needed in RollerImpl.storePersistentObject() */ public void setData(org.roller.pojos.PersistentObject otherData) { WebsiteData other = (WebsiteData)otherData; this.id = other.id; this.name = other.name; this.description = other.description; this.mUser = other.mUser; this.defaultPageId = other.defaultPageId; this.weblogDayPageId = other.weblogDayPageId; this.enableBloggerApi = other.enableBloggerApi; this.bloggerCategory = other.bloggerCategory; this.defaultCategory = other.defaultCategory; this.editorPage = other.editorPage; this.ignoreWords = other.ignoreWords; this.allowComments = other.allowComments; this.emailComments = other.emailComments; this.emailFromAddress = other.emailFromAddress; this.editorTheme = other.editorTheme; this.locale = other.locale; this.timezone = other.timezone; this.mDefaultPlugins = other.mDefaultPlugins; this.isEnabled = other.isEnabled; } /** * Parse locale value and instantiate a Locale object, * otherwise return default Locale. * @return Locale */ public Locale getLocaleInstance() { if (locale != null) { String[] localeStr = StringUtils.split(locale,"_"); if (localeStr.length == 1) { if (localeStr[0] == null) localeStr[0] = ""; return new Locale(localeStr[0]); } else if (localeStr.length == 2) { if (localeStr[0] == null) localeStr[0] = ""; if (localeStr[1] == null) localeStr[1] = ""; return new Locale(localeStr[0], localeStr[1]); } else if (localeStr.length == 3) { if (localeStr[0] == null) localeStr[0] = ""; if (localeStr[1] == null) localeStr[1] = ""; if (localeStr[2] == null) localeStr[2] = ""; return new Locale(localeStr[0], localeStr[1], localeStr[2]); } } return Locale.getDefault(); } /** * Return TimeZone instance for value of timezone, * otherwise return system default instance. * @return TimeZone */ public TimeZone getTimeZoneInstance() { if (timezone == null) { if (TimeZone.getDefault() != null) { this.setTimezone( TimeZone.getDefault().getID() ); } else { this.setTimezone("America/New_York"); } } return TimeZone.getTimeZone(timezone); } /** * @see org.roller.pojos.PersistentObject#remove() */ public void remove() throws RollerException { RollerFactory.getRoller().getUserManager().removeWebsiteContents(this); super.remove(); } public boolean canSave() throws RollerException { Roller roller = RollerFactory.getRoller(); if (roller.getUser().equals(UserData.SYSTEM_USER)) { return true; } if (roller.getUser().equals(getUser())) { return true; } return false; }}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -