// Path: src/main/java/org/andidev/applicationname/entity/User.java
// @Entity
// @NoArgsConstructor(access = PROTECTED)
// @RequiredArgsConstructor
// @Setter
// @Getter
// public class User extends IdEntity implements UserDetails, Serializable {
// 
//     @Column(unique = true)
//     @NonNull
//     private String username;
//     @NonNull
//     private String password;
//     private String firstName;
//     private String lastName;
//     private String email;
//     private boolean accountNonExpired;
//     private boolean accountNonLocked;
//     private boolean credentialsNonExpired;
//     private boolean enabled;
//     private Period automaticLogoutTime;
//     private Locale locale;
//     private DateTimeZone timeZone;
//     private String dateFormat = "yyyy/MM/dd";
//     private String timeFormat = "HH.mm";
//     @ElementCollection(targetClass = Role.class, fetch = EAGER)
//     @Enumerated(STRING)
//     private Set<Role> userRoles = EnumSet.noneOf(Role.class);
//     @ManyToMany(mappedBy = "users", fetch = EAGER)
//     private Set<Group> groups = new HashSet();
//     @OneToMany(fetch = EAGER)
//     private Set<PreferenceValue> preferenceValues = new HashSet();
// 
//     public Set<Role> getRoles() {
//         Set<Role> roles = EnumSet.noneOf(Role.class);
//         roles.addAll(getUserRoles());
//         roles.addAll(getGroupRoles());
//         return roles;
//     }
// 
//     private Set<Role> getGroupRoles() {
//         Set<Role> roles = EnumSet.noneOf(Role.class);
//         for (Group group : getGroups()) {
//             roles.addAll(group.getGroupRoles());
//         }
//         return roles;
//     }
// 
//     @Override
//     public Collection<? extends GrantedAuthority> getAuthorities() {
//         Set<GrantedAuthority> grantedAuthorities = new LinkedHashSet<>();
//         for (Role role : getRoles()) {
//             grantedAuthorities.add(new SimpleGrantedAuthority(role.name()));
//         }
//         return grantedAuthorities;
//     }
// }


import javax.persistence.*;
import org.andidev.applicationname.entity.User;
import org.apache.commons.lang3.builder.ReflectionToStringBuilder;
import org.apache.commons.lang3.builder.ToStringBuilder;
import static org.apache.commons.lang3.builder.ToStringStyle.*;
import org.hibernate.LazyInitializationException;
import org.springframework.data.jpa.domain.AbstractAuditable;
import org.springframework.data.jpa.domain.support.AuditingEntityListener;
package org.andidev.applicationname.entity.abstracts;


@EntityListeners(AuditingEntityListener.class)
@MappedSuperclass
public class IdAuditableEntity extends AbstractAuditable<User, Long> {

    @Override
    public String toString() {
        try {
// Path: src/main/java/org/andidev/applicationname/entity/User.java
// @Entity
// @NoArgsConstructor(access = PROTECTED)
// @RequiredArgsConstructor
// @Setter
// @Getter
// public class User extends IdEntity implements UserDetails, Serializable {
// 
//     @Column(unique = true)
//     @NonNull
//     private String username;
//     @NonNull
//     private String password;
//     private String firstName;
//     private String lastName;
//     private String email;
//     private boolean accountNonExpired;
//     private boolean accountNonLocked;
//     private boolean credentialsNonExpired;
//     private boolean enabled;
//     private Period automaticLogoutTime;
//     private Locale locale;
//     private DateTimeZone timeZone;
//     private String dateFormat = "yyyy/MM/dd";
//     private String timeFormat = "HH.mm";
//     @ElementCollection(targetClass = Role.class, fetch = EAGER)
//     @Enumerated(STRING)
//     private Set<Role> userRoles = EnumSet.noneOf(Role.class);
//     @ManyToMany(mappedBy = "users", fetch = EAGER)
//     private Set<Group> groups = new HashSet();
//     @OneToMany(fetch = EAGER)
//     private Set<PreferenceValue> preferenceValues = new HashSet();
// 
//     public Set<Role> getRoles() {
//         Set<Role> roles = EnumSet.noneOf(Role.class);
//         roles.addAll(getUserRoles());
//         roles.addAll(getGroupRoles());
//         return roles;
//     }
// 
//     private Set<Role> getGroupRoles() {
//         Set<Role> roles = EnumSet.noneOf(Role.class);
//         for (Group group : getGroups()) {
//             roles.addAll(group.getGroupRoles());
//         }
//         return roles;
//     }
// 
//     @Override
//     public Collection<? extends GrantedAuthority> getAuthorities() {
//         Set<GrantedAuthority> grantedAuthorities = new LinkedHashSet<>();
//         for (Role role : getRoles()) {
//             grantedAuthorities.add(new SimpleGrantedAuthority(role.name()));
//         }
//         return grantedAuthorities;
//     }
// }


// Path: src/main/java/org/andidev/applicationname/entity/abstracts/IdAuditableEntity.java
import javax.persistence.*;
import org.andidev.applicationname.entity.User;
import org.apache.commons.lang3.builder.ReflectionToStringBuilder;
import org.apache.commons.lang3.builder.ToStringBuilder;
import static org.apache.commons.lang3.builder.ToStringStyle.*;
import org.hibernate.LazyInitializationException;
import org.springframework.data.jpa.domain.AbstractAuditable;
import org.springframework.data.jpa.domain.support.AuditingEntityListener;

package org.andidev.applicationname.entity.abstracts;


@EntityListeners(AuditingEntityListener.class)
@MappedSuperclass
public class IdAuditableEntity extends AbstractAuditable<User, Long> {

    @Override
    public String toString() {
        try {
            return ReflectionToStringBuilder.reflectionToString(this, SHORT_PREFIX_STYLE);