/** * Method equals. * * @param other * @return boolean */ public boolean equals( Object other ) { if ( this == other ) { return true; } if ( !( other instanceof PublishDate ) ) { return false; } PublishDate that = (PublishDate) other; boolean result = true; result = result && ( getPosition() == null ? that.getPosition() == null : getPosition().equals( that.getPosition() ) ); result = result && ( getFormat() == null ? that.getFormat() == null : getFormat().equals( that.getFormat() ) ); return result; } //-- boolean equals( Object )
public PublishDate getPublishDate() { if ( publishDate == null ) return new PublishDate(); else return publishDate; }
PublishDate publishDate = new PublishDate(); for ( int i = parser.getAttributeCount() - 1; i >= 0; i-- ) publishDate.setPosition( getTrimmedValue( value ) ); publishDate.setFormat( getTrimmedValue( value ) );
DateFormat dateFormat = new SimpleDateFormat( publishDate.getFormat(), locale ); context.put( "dateFormat", dateFormat );
copy.publishDate = (PublishDate) this.publishDate.clone();
/** * Method hashCode. * * @return int */ public int hashCode() { int result = 17; result = 37 * result + ( name != null ? name.hashCode() : 0 ); result = 37 * result + ( bannerLeft != null ? bannerLeft.hashCode() : 0 ); result = 37 * result + ( bannerRight != null ? bannerRight.hashCode() : 0 ); result = 37 * result + ( googleAdSenseClient != null ? googleAdSenseClient.hashCode() : 0 ); result = 37 * result + ( googleAdSenseSlot != null ? googleAdSenseSlot.hashCode() : 0 ); result = 37 * result + ( googleAnalyticsAccountId != null ? googleAnalyticsAccountId.hashCode() : 0 ); result = 37 * result + ( publishDate != null ? publishDate.hashCode() : 0 ); result = 37 * result + ( version != null ? version.hashCode() : 0 ); result = 37 * result + ( edit != null ? edit.hashCode() : 0 ); result = 37 * result + ( poweredBy != null ? poweredBy.hashCode() : 0 ); result = 37 * result + ( skin != null ? skin.hashCode() : 0 ); result = 37 * result + ( body != null ? body.hashCode() : 0 ); result = 37 * result + ( custom != null ? custom.hashCode() : 0 ); return result; } //-- int hashCode()
result = result && ( getGoogleAdSenseSlot() == null ? that.getGoogleAdSenseSlot() == null : getGoogleAdSenseSlot().equals( that.getGoogleAdSenseSlot() ) ); result = result && ( getGoogleAnalyticsAccountId() == null ? that.getGoogleAnalyticsAccountId() == null : getGoogleAnalyticsAccountId().equals( that.getGoogleAnalyticsAccountId() ) ); result = result && ( getPublishDate() == null ? that.getPublishDate() == null : getPublishDate().equals( that.getPublishDate() ) ); result = result && ( getVersion() == null ? that.getVersion() == null : getVersion().equals( that.getVersion() ) ); result = result && ( getEdit() == null ? that.getEdit() == null : getEdit().equals( that.getEdit() ) );
String dateFormat = siteRenderingContext.getDecoration().getPublishDate().getFormat();
child.setPublishDate( parent.getPublishDate().clone() );
/** * Method toString. * * @return String */ public java.lang.String toString() { StringBuilder buf = new StringBuilder( 128 ); buf.append( "position = '" ); buf.append( getPosition() ); buf.append( "'" ); buf.append( "\n" ); buf.append( "format = '" ); buf.append( getFormat() ); buf.append( "'" ); return buf.toString(); } //-- java.lang.String toString()
/** * Method writePublishDate. * * @param publishDate * @param serializer * @param tagName * @throws java.io.IOException */ private void writePublishDate( PublishDate publishDate, String tagName, XmlSerializer serializer ) throws java.io.IOException { serializer.startTag( NAMESPACE, tagName ); if ( ( publishDate.getPosition() != null ) && !publishDate.getPosition().equals( "left" ) ) { serializer.attribute( NAMESPACE, "position", publishDate.getPosition() ); } if ( ( publishDate.getFormat() != null ) && !publishDate.getFormat().equals( "yyyy-MM-dd" ) ) { serializer.attribute( NAMESPACE, "format", publishDate.getFormat() ); } serializer.endTag( NAMESPACE, tagName ); } //-- void writePublishDate( PublishDate, String, XmlSerializer )