Skip to content

Commit

Permalink
DATAJPA-98 - Formatted sources with Spring Data Eclipse formatting se…
Browse files Browse the repository at this point in the history
…ttings.
  • Loading branch information
odrotbohm committed Sep 2, 2011
1 parent d5651cd commit b291a5f
Show file tree
Hide file tree
Showing 103 changed files with 6,446 additions and 7,363 deletions.
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -2,4 +2,6 @@ target/
.settings/ .settings/
.project .project
.classpath .classpath
.springBeans .springBeans
.sonar4clipse
*.sonar4clipseExternals
291 changes: 291 additions & 0 deletions formatting.xml

Large diffs are not rendered by default.

219 changes: 104 additions & 115 deletions src/main/java/org/springframework/data/jpa/domain/AbstractAuditable.java
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -26,126 +26,115 @@
import org.joda.time.DateTime; import org.joda.time.DateTime;
import org.springframework.data.domain.Auditable; import org.springframework.data.domain.Auditable;



/** /**
* Abstract base class for auditable entities. Stores the audition values in * Abstract base class for auditable entities. Stores the audition values in persistent fields.
* persistent fields.
* *
* @author Oliver Gierke * @author Oliver Gierke
* @param <U> the auditing type. Typically some kind of user. * @param <U> the auditing type. Typically some kind of user.
* @param <PK> the type of the auditing type's idenifier * @param <PK> the type of the auditing type's idenifier
*/ */
@MappedSuperclass @MappedSuperclass
public abstract class AbstractAuditable<U, PK extends Serializable> extends public abstract class AbstractAuditable<U, PK extends Serializable> extends AbstractPersistable<PK> implements
AbstractPersistable<PK> implements Auditable<U, PK> { Auditable<U, PK> {


private static final long serialVersionUID = 141481953116476081L; private static final long serialVersionUID = 141481953116476081L;


@OneToOne @OneToOne
private U createdBy; private U createdBy;


@Temporal(TemporalType.TIMESTAMP) @Temporal(TemporalType.TIMESTAMP)
private Date createdDate; private Date createdDate;


@OneToOne @OneToOne
private U lastModifiedBy; private U lastModifiedBy;


@Temporal(TemporalType.TIMESTAMP) @Temporal(TemporalType.TIMESTAMP)
private Date lastModifiedDate; private Date lastModifiedDate;



/*
/* * (non-Javadoc)
* (non-Javadoc) *
* * @see org.springframework.data.domain.Auditable#getCreatedBy()
* @see org.springframework.data.domain.Auditable#getCreatedBy() */
*/ public U getCreatedBy() {
public U getCreatedBy() {

return createdBy;
return createdBy; }
}

/*

* (non-Javadoc)
/* *
* (non-Javadoc) * @see
* * org.springframework.data.domain.Auditable#setCreatedBy(java.lang.Object)
* @see */
* org.springframework.data.domain.Auditable#setCreatedBy(java.lang.Object) public void setCreatedBy(final U createdBy) {
*/
public void setCreatedBy(final U createdBy) { this.createdBy = createdBy;

}
this.createdBy = createdBy;
} /*

* (non-Javadoc)

*
/* * @see org.springframework.data.domain.Auditable#getCreatedDate()
* (non-Javadoc) */
* public DateTime getCreatedDate() {
* @see org.springframework.data.domain.Auditable#getCreatedDate()
*/ return null == createdDate ? null : new DateTime(createdDate);
public DateTime getCreatedDate() { }


return null == createdDate ? null : new DateTime(createdDate); /*
} * (non-Javadoc)

*

* @see
/* * org.springframework.data.domain.Auditable#setCreatedDate(org.joda.time
* (non-Javadoc) * .DateTime)
* */
* @see public void setCreatedDate(final DateTime createdDate) {
* org.springframework.data.domain.Auditable#setCreatedDate(org.joda.time
* .DateTime) this.createdDate = null == createdDate ? null : createdDate.toDate();
*/ }
public void setCreatedDate(final DateTime createdDate) {

/*
this.createdDate = null == createdDate ? null : createdDate.toDate(); * (non-Javadoc)
} *

* @see org.springframework.data.domain.Auditable#getLastModifiedBy()

*/
/* public U getLastModifiedBy() {
* (non-Javadoc)
* return lastModifiedBy;
* @see org.springframework.data.domain.Auditable#getLastModifiedBy() }
*/
public U getLastModifiedBy() { /*

* (non-Javadoc)
return lastModifiedBy; *
} * @see

* org.springframework.data.domain.Auditable#setLastModifiedBy(java.lang

* .Object)
/* */
* (non-Javadoc) public void setLastModifiedBy(final U lastModifiedBy) {
*
* @see this.lastModifiedBy = lastModifiedBy;
* org.springframework.data.domain.Auditable#setLastModifiedBy(java.lang }
* .Object)
*/ /*
public void setLastModifiedBy(final U lastModifiedBy) { * (non-Javadoc)

*
this.lastModifiedBy = lastModifiedBy; * @see org.springframework.data.domain.Auditable#getLastModifiedDate()
} */

public DateTime getLastModifiedDate() {


/* return null == lastModifiedDate ? null : new DateTime(lastModifiedDate);
* (non-Javadoc) }
*
* @see org.springframework.data.domain.Auditable#getLastModifiedDate() /*
*/ * (non-Javadoc)
public DateTime getLastModifiedDate() { *

* @see
return null == lastModifiedDate ? null : new DateTime(lastModifiedDate); * org.springframework.data.domain.Auditable#setLastModifiedDate(org.joda
} * .time.DateTime)

*/

public void setLastModifiedDate(final DateTime lastModifiedDate) {
/*
* (non-Javadoc) this.lastModifiedDate = null == lastModifiedDate ? null : lastModifiedDate.toDate();
* }
* @see
* org.springframework.data.domain.Auditable#setLastModifiedDate(org.joda
* .time.DateTime)
*/
public void setLastModifiedDate(final DateTime lastModifiedDate) {

this.lastModifiedDate =
null == lastModifiedDate ? null : lastModifiedDate.toDate();
}
} }
Loading

0 comments on commit b291a5f

Please sign in to comment.