Jean-Francois Leveque

Premier jet historique editeur avce import User v2 inclus

package org.legrog.entities;
import javax.persistence.*;
import java.util.Set;
@Entity
//@Table(name = "editeur")
public class Publisher /* extends org.roliste.data.DbLinkableEntity */ {
// TODO L'éventuel usage de Linkable reste à confirmer https://tree.taiga.io/project/jr-utily-grog-v3/us/48
// TODO Attention, en v2 Linkable implique Traceable (journalisable) qui devrait aussi être évalué
@Id
// @Column(name = "ID_EDITEUR")
@GeneratedValue(strategy = GenerationType.AUTO)
private int publisherId;
@OneToOne
private PublisherRevision activeRevision;
@OneToOne
private User activeValidator;
@OneToMany
private Set<PublisherRevision> revisions;
public int getPublisherId() {
return publisherId;
}
public void setPublisherId(int publisherId) {
this.publisherId = publisherId;
}
public PublisherRevision getActiveRevision() {
return activeRevision;
}
public void setActiveRevision(PublisherRevision activeRevision) {
this.activeRevision = activeRevision;
}
public Set<PublisherRevision> getRevisions() {
return revisions;
}
public void setRevisions(Set<PublisherRevision> revisions) {
this.revisions = revisions;
}
public User getActiveValidator() {
return activeValidator;
}
public void setActiveValidator(User activeValidator) {
this.activeValidator = activeValidator;
}
}
package org.legrog.entities;
import javax.persistence.*;
import java.sql.Timestamp;
@Entity
public class PublisherRevision {
@Id
@GeneratedValue(strategy = GenerationType.AUTO)
private int publisherRevisionId;
private String publisherName;
private String publisherStreetAddress;
private String publisherPostalCode;
private String publisherPostOfficeBoxNumber;
private String publisherAddressRegion;
private String publisherAddressLocality;
// TODO Créer l'entité Country
// private Country publisherAddressCountry;
private String publisherTelephone;
private String publisherEmail;
private String publisherURL;
private boolean publisherActive;
private String publisherHistory;
@OneToOne
private User publisherRevisionAuthor;
private Timestamp publisherRevisionDatetime;
public Timestamp getPublisherRevisionDatetime() {
return publisherRevisionDatetime;
}
public void setPublisherRevisionDatetime(Timestamp publisherRevisionDatetime) {
this.publisherRevisionDatetime = publisherRevisionDatetime;
}
public boolean isPublisherActive() {
return publisherActive;
}
public void setPublisherActive(boolean publisherActive) {
this.publisherActive = publisherActive;
}
public String getPublisherHistory() {
return publisherHistory;
}
public void setPublisherHistory(String publisherHistory) {
this.publisherHistory = publisherHistory;
}
public String getPublisherStreetAddress() {
return publisherStreetAddress;
}
public void setPublisherStreetAddress(String publisherStreetAddress) {
this.publisherStreetAddress = publisherStreetAddress;
}
public String getPublisherPostalCode() {
return publisherPostalCode;
}
public void setPublisherPostalCode(String publisherPostalCode) {
this.publisherPostalCode = publisherPostalCode;
}
public String getPublisherPostOfficeBoxNumber() {
return publisherPostOfficeBoxNumber;
}
public void setPublisherPostOfficeBoxNumber(String publisherPostOfficeBoxNumber) {
this.publisherPostOfficeBoxNumber = publisherPostOfficeBoxNumber;
}
public String getPublisherAddressRegion() {
return publisherAddressRegion;
}
public void setPublisherAddressRegion(String publisherAddressRegion) {
this.publisherAddressRegion = publisherAddressRegion;
}
public String getPublisherAddressLocality() {
return publisherAddressLocality;
}
public void setPublisherAddressLocality(String publisherAddressLocality) {
this.publisherAddressLocality = publisherAddressLocality;
}
public String getPublisherTelephone() {
return publisherTelephone;
}
public void setPublisherTelephone(String publisherTelephone) {
this.publisherTelephone = publisherTelephone;
}
public String getPublisherEmail() {
return publisherEmail;
}
public void setPublisherEmail(String publisherEmail) {
this.publisherEmail = publisherEmail;
}
public String getPublisherURL() {
return publisherURL;
}
public void setPublisherURL(String publisherURL) {
this.publisherURL = publisherURL;
}
public int getPublisherRevisionId() {
return publisherRevisionId;
}
public void setPublisherRevisionId(int publisherRevisionId) {
this.publisherRevisionId = publisherRevisionId;
}
public String getPublisherName() {
return publisherName;
}
public void setPublisherName(String publisherName) {
this.publisherName = publisherName;
}
}
\ No newline at end of file
package org.legrog.entities;
import javax.persistence.*;
import java.util.*;
// TODO Evaluer l'interet de ces imports
//import org.roliste.data.DbMaskableEntity;
//import org.roliste.data.DbValidationEntity;
@NamedQueries({
@NamedQuery(
name="findById",
query="SELECT u FROM User u WHERE u.userId=:id"
),
@NamedQuery(
name="listByPattern",
query="SELECT u FROM User u WHERE lower(u.username) LIKE :pattern or lower(u.email) LIKE :pattern or lower(u.firstName) LIKE :pattern or lower(u.lastName) LIKE :pattern or lower(u.nickname) LIKE :pattern ORDER BY u.userId DESC"
),
@NamedQuery(
name="listVisibleByPattern",
query="SELECT u FROM User u WHERE u.visible = true AND u.activated = true AND (lower(u.username) LIKE :pattern or lower(u.email) LIKE :pattern)"
),
@NamedQuery(
name="findByUsername",
query="SELECT u FROM User u WHERE u.username=:username"
),
@NamedQuery(
name="findByEmail",
query="SELECT u FROM User u WHERE u.email=:email"
),
/* TODO Régler le problème avec elements
@NamedQuery(
name="listByRolename",
query="SELECT u FROM User u, UserRole r WHERE r in elements(u.roles) AND r.rolename=:rolename AND u.visible is true AND u.activated is true"
),
*/
@NamedQuery(
name="listForEmailSend",
query="SELECT u FROM User u WHERE u.visible = true AND u.activated = true"
),
@NamedQuery(
name="listWithExactUserName",
query="SELECT u FROM User u WHERE u.visible = true AND u.activated = true AND u.username in (:usernames)"
),
@NamedQuery(
name="listVisibleCriticsProviders",
query="SELECT u FROM User u WHERE u.visible = true AND u.activated = true AND u.criticProvider = true"
),
/* TODO Régler le problème avec elements
@NamedQuery(
name="listPublisherDelegationsByUser",
query="SELECT p FROM Publisher p, User u WHERE u=:user AND p.traceable IN ELEMENTS(u.delegations) ORDER BY p.pubName"
),
*/
/* TODO Régler le problème avec elements
@NamedQuery(
name="listAuthorDelegationsByUser",
query="SELECT a FROM Author a, User u WHERE u=:user AND a.traceable IN ELEMENTS(u.delegations) ORDER BY a.lastName, a.firstName"
),
*/
/* TODO Régler le problème avec elements
@NamedQuery(
name="listPartnerDelegationsByUser",
query="SELECT p FROM Partner p, User u WHERE u=:user AND p.traceable IN ELEMENTS(u.delegations) ORDER BY p.name"
),
*/
/* TODO Régler le problème avec elements
@NamedQuery(
name="listIndieGameDelegationsByUser",
query="SELECT i FROM IndieGame i, User u WHERE u=:user AND i.traceable IN ELEMENTS(u.delegations) ORDER BY i.title"
),
*/
@NamedQuery(
name="listToCleanup",
query="SELECT u FROM User u WHERE u.activated = false AND u.creationDate < :limitDate"
),
@NamedQuery(
name="listAll",
query="SELECT u FROM User u ORDER BY u.userId"
)
/* TODO Pas de traceable pour l'instant, remplacé ou réutilisé ?
,
@NamedQuery(
name="userNotActivatedWithJournalisable",
query="SELECT u FROM Traceable t, User u WHERE t.creator = u.pk and u.activated = false"
),
@NamedQuery(
name="findByUrl",
query="SELECT u FROM User u WHERE u.traceable.urlRewrite=:url"
)
*/
})
// TODO Vérifier les extends
// TODO NameMask et DbMaskableEntity à traiter ensemble
@Entity
//@Table(name="utilisateur")
public class User /* extends org.roliste.data.DbTraceableEntity implements DbMaskableEntity, DbValidationEntity */ {
// @Column(name="ID_UTILISATEUR")
@Id
@GeneratedValue(strategy = GenerationType.AUTO)
private int userId;
// TODO traiter Traceable
/**
* Retrieve this object's Traceable.
* @hibernate.many-to-one
* column="ID_JOURNALISABLE"
* class="org.roliste.data.db.Traceable"
* access="property"
* lazy="false"
* cascade="all"
* foreign-key="FK_THEME_JOURNALISABLE"
* @return the {@link org.roliste.data.db.Traceable} record corresponding to this object. May be <code>null</code>.
* @see #setTraceable(org.roliste.data.db.Traceable)
*/
/*
public Traceable getTraceable()
{
return _traceRoot;
}
*/
// TODO NameMask et DbMaskableEntity à traiter ensemble
/**
* The mask used for user name.
*/
// private NameMask _mask;
/*
@Override
public String getUrlKey()
{
return "/utilisateurs/" + getScreenName();
}
*/
/**
* @return the user's name as desired. By default, return the complete name.
* @see org.roliste.data.db.NameMask#mask(org.roliste.data.DbMaskableEntity)
*/
/*
public String getScreenName()
{
if (_mask != null)
return _mask.mask(this);
else
return NameMask.COMPLET.mask(this);
}
*/
/**
* Returns the user's name mask.
* @return the mask.
* @see #setNameMask(NameMask)
* hibernate.property
* column="MASQUE_NOM_UTILISATEUR"
* access="property"
* length="50"
* @hibernate.type
* name="org.roliste.data.util.NameMaskUserType"
*/
/*
public NameMask getNameMask() {
return _mask;
}
*/
/**
* Initializes the user's name mask.
* @param mask the new {@link org.roliste.data.db.NameMask}.
* @see #getNameMask()
*/
/*
public void setNameMask(NameMask mask) {
_mask = mask;
}
*/
// TODO Faire ailleurs les contrôles de chaîne vide sur : username, password, firstname, lastname, nickname, email, text
/**
* The user identifier.
*/
private String username;
/**
* The user password.
*/
private String password;
/**
* The user first name.
*/
private String firstName;
/**
* The user last name.
*/
private String lastName;
/**
* The user screen name.
*/
private String nickname;
/**
* The user email address.
*/
private String email;
/**
* The {@link org.roliste.data.db.UserRole}s for this user.
*/
// private List<UserRole> _roles;
/**
* Retrieves the list of {@link UserRole}s for this user.
* SHALL be used as a read-only attribute. In particular, avoid
* using {@link List#add(Object)} or {@link List#remove(Object)} on
* the returned value without caution.
* @return a {@link List} of {@link UserRole}. Shall not be <code>null</code>.
* @see #setRoles(List)
* @see #addToRole(UserRole)
* @see #removeFromRole(UserRole)
* @hibernate.many-to-many
* column="ROLE_FK"
* class="org.roliste.data.db.UserRole"
* foreign-key="FK_UTILISATEURROLE_ROLEUTILISATEUR"
* @hibernate.key
* column="UTILISATEUR_FK"
* not-null="true"
* foreign-key="FK_UTILISATEURROLE_UTILISATEUR"
* @hibernate.bag
* cascade="save-update"
* access="property"
* table="role_utilisateur"
* lazy="true"
*/
/*
public List<UserRole> getRoles() {
return _roles;
}
*/
/**
* Lists the list of {@link UserRole}s for this user.
* @param roles the new {@link List} of {@link UserRole}s. Shall not be <code>null</code>.
* @throws NullPointerException if roles is <code>null</code>.
* @see #getRoles()
* @see #addToRole(UserRole)
* @see #removeFromRole(UserRole)
*/
/*
public void setRoles(List<UserRole> roles) {
if (roles == null)
{
throw new NullPointerException("Impossible d'affecter un ensemble nul aux r�les d'un utilisateur");
}
_roles = roles;
}
*/
/**
* Add the user to a given {@link UserRole}s.
* @param role the new {@link UserRole}. Ignored if <code>null</code>.
* @see #getRoles()
* @see #setRoles(List)
* @see #removeFromRole(UserRole)
*/
/*
public void addToRole(UserRole role) {
synchronized (this)
{
if ((role != null) && !(getRoles().contains(role)) )
{
role.getUsers().add(this);
getRoles().add(role);
}
}
}
*/
/**
* Remove the user from a given {@link UserRole}s.
* @param role the {@link UserRole} this {@link User} will lose. Ignored if <code>null</code>.
* @see #getRoles()
* @see #setRoles(List)
* @see #addToRole(UserRole)
*/
/*
public void removeFromRole(UserRole role) {
synchronized (this)
{
if ((role != null) && (getRoles().contains(role)) )
{
role.getUsers().remove(this);
getRoles().remove(role);
}
}
}
*/
/**
* The user anonymous status.
* If anonymous, user cannot be contacted through email.
*/
private boolean anonymous;
/**
* The user validation status.
*/
private boolean visible;
/**
* The user was activated at least once.
*/
private boolean activated;
/**
* The user provides critics for archive.
*/
private boolean criticProvider;
/**
* Presentation text.
*/
private String text;
/**
* The {@link org.roliste.data.db.BookDetails}s in this user's collection.
*/
// private List<BookDetails> _collection;
/**
* Retrieves the list of {@link org.roliste.data.db.BookDetails}s in this user's collection.
* SHALL be used as a read-only attribute. In particular, avoid using {@link List#add(Object)}
* or {@link List#remove(Object)} on the returned value without caution.
* @return a {@link List} of {@link org.roliste.data.db.BookDetails}. Shall not be <code>null</code>.
* @see #setCollection(List)
* @see #addToCollection(BookDetails)
* @see #removeFromCollection(BookDetails)
* @hibernate.many-to-many
* column="DETAILS_FK"
* class="org.roliste.data.db.BookDetails"
* foreign-key="FK_COLLECTION_DETAIL"
* @hibernate.key
* column="UTILISATEUR_FK"
* not-null="true"
* foreign-key="FK_COLLECTION_UTILISATEUR"
* @hibernate.bag
* access="property"
* table="collection"
* lazy="true"
*/
/*
public List<BookDetails> getCollection() {
return _collection;
}
*/
/**
* Lists the list of {@link org.roliste.data.db.BookDetails}s in this user's collection.
* @param collec the new {@link List} of {@link org.roliste.data.db.BookDetails}s. Shall not be <code>null</code>.
* @throws NullPointerException if collec is <code>null</code>.
* @see #getCollection()
* @see #addToCollection(BookDetails)
* @see #removeFromCollection(BookDetails)
*/
/*
public void setCollection(List<BookDetails> collec) {
if (collec == null)
{
throw new NullPointerException("Impossible d'affecter un ensemble nul pour la collection d'un utilisateur");
}
_collection = collec;
}
*/
/**
* Add a book to the user's collection.
* @param book the new {@link org.roliste.data.db.BookDetails}. Ignored if <code>null</code>.
* @see #getCollection()
* @see #setCollection(List)
* @see #removeFromCollection(BookDetails)
*/
/*
public void addToCollection(BookDetails book) {
synchronized (this)
{
if ((book != null) && !(getCollection().contains(book)) )
{
book.getOwners().add(this);
getCollection().add(book);
}
}
}
*/
/**
* Remove a book from user's collection.
* @param book the {@link org.roliste.data.db.BookDetails} this {@link User} will lose. Ignored if <code>null</code>.
* @see #getCollection()
* @see #setCollection(List)
* @see #addToCollection(BookDetails)
*/
/*
public void removeFromCollection(BookDetails book) {
synchronized (this)
{
if ((book != null) && (getCollection().contains(book)) )
{
book.getOwners().remove(this);
getCollection().remove(book);
}
}
}
*/
/**
* The {@link org.roliste.data.db.Traceable}s delegated to this user.
*/
// private List<Traceable> _delegations;
/**
* Retrieves the list of delegations for this user.
* Each delegation is a link to a {@link org.roliste.data.db.Traceable} object.
* A user having delegation may update field values for delegated object.
* @return a {@link List} of {@link UserRole}. Shall not be <code>null</code>. SHALL be used as a
* read-only attribute. In particular, avoid using {@link List#add(Object)} or {@link List#remove(Object)}
* on the returned value without caution.
* @see #setDelegations(List)
* @see #giveDelegation(Traceable)
* @see #removeDelegation(Traceable)
* @hibernate.many-to-many
* column="ID_JOURNALISABLE"
* class="org.roliste.data.db.Traceable"
* foreign-key="FK_DELEGATION_JOURNALISABLE"
* @hibernate.key
* column="ID_UTILISATEUR"
* not-null="true"
* foreign-key="FK_DELEGATION_UTILISATEUR"
* @hibernate.bag
* cascade="save-update"
* access="property"
* table="delegation_utilisateur"
* lazy="true"
*/
/*
public List<Traceable> getDelegations() {
return _delegations;
}
*/
/**
* Sets the list of delegations for this user.
* @param objects the new {@link List} of delegated {@link Traceable}. Shall not be <code>null</code>.
* @throws NullPointerException if objects is <code>null</code>.
* @see #getDelegations()
* @see #giveDelegation(Traceable)
* @see #removeDelegation(Traceable)
*/
/*
public void setDelegations(List<Traceable> objects) {
if (_delegations == null)
{
throw new NullPointerException("Impossible d'affecter un ensemble nul aux d�l�gations d'un utilisateur");
}
_delegations = objects;
}
*/
/**
* Give delegation on a given {@link Traceable} to this user.
* @param object the new delegation. Ignored if <code>null</code>.
* @see #getDelegations()
* @see #setDelegations(List)
* @see #removeDelegation(Traceable)
*/
/*
public void giveDelegation(Traceable object) {
synchronized (this)
{
if ((object != null) && !(getDelegations().contains(object)) )
{
object.getDelegates().add(this);
getDelegations().add(object);
}
}
}
*/
/**
* Remove delegation on a given {@link Traceable} from this user.
* @param object the delegation this {@link User} will lose. Ignored if <code>null</code>.
* @see #getDelegations()
* @see #setDelegations(List)
* @see #giveDelegation(Traceable)
*/
/*
public void removeDelegation(Traceable object) {
synchronized (this)
{
if ((object != null) && (getDelegations().contains(object)) )
{
object.getDelegates().remove(this);
getDelegations().remove(object);
}
}
}
*/
/**
* Clear all delegations for this user.
*/
/*
public void clearDelegations()
{
synchronized (this)
{
for (Traceable root : getDelegations())
{
root.getDelegates().remove(this);
}
getDelegations().clear();
}
}
*/
/**
* The list of attributes / properties for this user.
*/
// private List<UserAttribute> _attrs;
/**
* Retrieve this user's attributes.
* @hibernate.one-to-many
* class="org.roliste.data.db.UserAttribute"
* @hibernate.bag
* cascade="all"
* lazy="true"
* inverse="true"
* @hibernate.key
* column="ID_UTILISATEUR"
* @return a {@link java.util.List} of user attributes linked to this. Shall not be <code>null</code>.
* @see #setAttributes(java.util.List)
*/
/*
public List<UserAttribute> getAttributes()
{
return _attrs;
}
*/
/**
* @param attribs the List of attributes for this user.
* @see #getAttributes()
*/
/*
public void setAttributes(List<UserAttribute> attribs)
{
_attrs = attribs;
}
*/
/**
* The {@link org.roliste.data.db.GamingEvent}s this user's visited.
*/
// private Set<GamingEvent> _visitedEvents = new HashSet<GamingEvent>();
/**
* Retrieves the list of {@link GamingEvent}s visited by this user.
* SHALL be used as a read-only attribute. In particular, avoid
* using {@link Set#add(Object)} or {@link Set#remove(Object)} on
* the returned value without caution.
* @return a {@link Set} of {@link GamingEvent}s. May be <code>null</code>.
* @see #setVisitedEvents(Set)
* @hibernate.many-to-many
* column="MANIF_FK"
* class="org.roliste.data.db.GamingEvent"
* @hibernate.key
* column="UTILISATEUR_FK"
* not-null="true"
* @hibernate.set
* access="property"
* table="manif_utilisateur"
* inverse="true"
* lazy="true"
*/
/*
public Set<GamingEvent> getVisitedEvents() {
return _visitedEvents;
}
*/
/**
* Sets the list of {link GamingEvent}s for this user.
* param events the new {@link Set} of {link GamingEvent}s. May be
* <code>null</code> (we don't handle the relation from this side).
* see #getVisitedEvents()
*/
/*
protected void setVisitedEvents(Set<GamingEvent> events) {
_visitedEvents = events;
}
*/
public int getUserId() {
return userId;
}
public void setUserId(int userId) {
this.userId = userId;
}
/**
* Returns the user identifier.
* @return the {@link String} identifier.
* @see #setUsername(String)
* hibernate.property
* column="LOGIN_UTILISATEUR"
* not-null="true"
* unique="true"
* access="property"
* length="50"
*/
public String getUsername() {
return username;
}
/**
* Initializes the user identifier.
* @param name the new {@link String} identifier.
* @see #getUsername()
*/
public void setUsername(String name) {
this.username = name;
}
/**
* Returns the user password.
* @return the {@link String} password.
* @see #setPassword(String)
* hibernate.property
* column="PASS_UTILISATEUR"
* not-null="true"
* access="property"
* length="50"
*/
public String getPassword() {
return password;
}
/**
* Initializes the user password.
* @param pwd the new {@link String} password.
* @see #getPassword()
*/
public void setPassword(String pwd) {
this.password = pwd;
}
/**
* Returns the user full first name.
* @return the {@link String} first name.
* @see #setFirstName(String)
* hibernate.property
* column="PRENOM_UTILISATEUR"
* not-null="true"
* access="property"
* length="50"
*/
public String getFirstName() {
return firstName;
}
/**
* Initializes the user first name.
* @param name the new {@link String} first name.
* @see #getFirstName()
*/
public void setFirstName(String name) {
this.firstName = name;
}
/**
* Returns the user full last name.
* @return the {@link String} last name.
* @see #setLastName(String)
* hibernate.property
* column="NOM_UTILISATEUR"
* not-null="true"
* access="property"
* length="50"
*/
public String getLastName() {
return lastName;
}
/**
* Initializes the user last name.
* @param name the new {@link String} last name.
* @see #getLastName()
*/
public void setLastName(String name) {
this.lastName = name;
}
/**
* Returns the user full screen name.
* @return the {@link String} screen name.
* @see #setNickName(String)
* hibernate.property
* column="PSEUDO_UTILISATEUR"
* access="property"
* length="50"
*/
public String getNickName() {
return nickname;
}
/**
* Initializes the user screen name.
* @param name the new {@link String} screen name.
* @see #getNickName()
*/
public void setNickName(String name) {
this.nickname = name;
}
/**
* Returns the user email.
* @return the {@link String} email.
* @see #setEmail(String)
* hibernate.property
* column="EMAIL_UTILISATEUR"
* unique="true"
* not-null="true"
* access="property"
* length="100"
*/
public String getEmail() {
return email;
}
/**
* Initializes the user email.
* @param address the new {@link String} email.
* @see #getEmail()
*/
public void setEmail(String address) {
this.email = address;
}
/**
* Indicates if the user is anonymous.
* Anonymous users' email and first/last name won't be shown.
* @return the anonymous flag.
* @see #setAnonymous(boolean)
* hibernate.property
* column="IND_ANONYME"
* access="property"
*/
public boolean isAnonymous() {
return anonymous;
}
/**
* Initializes the user anonymous flag.
* @param anonymous the new flag value.
* @see #isAnonymous
*/
public void setAnonymous(boolean anonymous) {
this.anonymous = anonymous;
}
/**
* hibernate.property
* column="IND_VISIBLE"
* access="property"
*/
public boolean isVisible() {
// WARNING: Method documentation copied from DbValidationEntity
return visible;
}
public void setVisible(boolean visible) {
// WARNING: Method documentation copied from DbValidationEntity
this.visible = visible;
}
/**
* Indicates if the user was activated at least once.
* @return the activation flag.
* @see #setCriticProvider(boolean)
* hibernate.property
* column="IND_ACTIVE"
* access="property"
*/
public boolean isActivated() {
return activated;
}
/**
* Initializes the user activation flag.
* @param active the new flag value.
* @see #isActivated
*/
public void setActivated(boolean active) {
this.activated = active;
}
/**
* Indicates if the user provides critics for archives.
* @return the critics provider flag.
* @see #setCriticProvider(boolean)
* hibernate.property
* column="IND_CRITIQUES"
* access="property"
*/
public boolean isCriticProvider() {
return criticProvider;
}
/**
* Initializes the critics provider flag.
* @param flag the new flag value.
* @see #isCriticProvider
*/
public void setCriticProvider(boolean flag) {
this.criticProvider = flag;
}
/**
* Returns the HTML text presentation for this user.
* @return the {@link String} HTML text.
* @see #setPresentation(String)
* hibernate.property
* column="PRESENTATION"
* access="property"
* type="text"
* length="2147483647"
*/
public String getPresentation() {
return text;
}
/**
* Initializes the HTML text presentation.
* @param text the new {@link String} HTML text.
* @see #getPresentation()
*/
public void setPresentation(String text) {
this.text = text;
}
/**
* The user submission date.
*/
private Date creationDate;
/**
* Returns this object creation {@link Date}.
* @return the object creation {@link Date}.
* @see #setCreationDate(Date)
* hibernate.property
* column="DATE_ENREGISTREMENT"
* access="property"
*/
public Date getCreationDate() {
return creationDate;
}
/**
* Initializes the object creation {@link Date}.
* @param date the new object creation {@link Date}.
* @see #getCreationDate()
*/
public void setCreationDate(Date date) {
this.creationDate = date;
}
/**
* Returns a string representation of this user definition.
* @return a string representing this user definition.
* hidden
*/
public String toString()
{
StringBuilder sb = new StringBuilder();
sb.append("ID_UTILISATEUR=");
sb.append(userId);
sb.append(" LOGIN_UTILISATEUR=");
sb.append(username);
sb.append(" EMAIL_UTILISATEUR=");
sb.append(email);
sb.append(" PRENOM_UTILISATEUR=");
sb.append(firstName);
sb.append(" NOM_UTILISATEUR=");
sb.append(lastName);
sb.append(" PSEUDO_UTILISATEUR=");
sb.append(nickname);
return sb.toString();
}
}
\ No newline at end of file