All Downloads are FREE. Search and download functionalities are using the official Maven repository.

be.personify.iam.model.vault.SystemInfo Maven / Gradle / Ivy

There is a newer version: 1.5.2.RELEASE
Show newest version
package be.personify.iam.model.vault;

import javax.persistence.Convert;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Index;
import javax.persistence.Table;

import be.personify.iam.model.util.Persisted;
import be.personify.util.generator.MetaInfo;

@Entity
@MetaInfo( group="vault", frontendGroup="System", name="System Information", description="information about the system", 
		showInMenu=true, 
		iconClass="info-circle", 
		sortProperty = "year",
		sortOrder = "descending",
		sortOrderInGroup=1, 
		addable=false,
		editable = false,
		searchable = true,
		creatable = false,
		deletable = false,
		showDeleteButtonOnSearchResult = false,
		showEditButtonOnSearchResult = false,
		showDetailButtonOnSearchResult = true
)
@Table(name="system_info", indexes = {
		@Index(name = "idx_year_month_uq", columnList = "year,month", unique=true)
})
public class SystemInfo extends Persisted {
	
	
	private static final long serialVersionUID = -3580843539208491527L;


	@Id
	@GeneratedValue(strategy = GenerationType.AUTO)
	@MetaInfo(name="id", description="The id of the campaign entry", showInSearchResultGrid = false)
	private long id;
	
	private int year;
	
	@MetaInfo( searchable = false)
	private int month;
	
		
	@MetaInfo( name="activeUsers", description="number of active users", searchable=false, editable=false, creatable = false)
	private long activeUsers;
	
	@MetaInfo(searchable = false, creatable = false, editable = false)
	private long userCount;
	
	@MetaInfo(searchable = false, creatable = false, editable = false)
	private long organisationCount;
	
	@MetaInfo(searchable = false, creatable = false, editable = false)
	private long entitlementCount;
	
	@MetaInfo(searchable = false, creatable = false, editable = false)
	private long targetSystemCount;
	
	@MetaInfo( name="checksum", description="checksum", searchable=false, editable=false, showInSearchResultGrid = false)
	@Convert(converter=be.personify.iam.model.util.PasswordConverter.class)
	private String checksum;

	public long getId() {
		return id;
	}

	public void setId(long id) {
		this.id = id;
	}

	public int getYear() {
		return year;
	}

	public void setYear(int year) {
		this.year = year;
	}

	public int getMonth() {
		return month;
	}

	public void setMonth(int month) {
		this.month = month;
	}

	public long getActiveUsers() {
		return activeUsers;
	}

	public void setActiveUsers(long activeUsers) {
		this.activeUsers = activeUsers;
	}

	public long getUserCount() {
		return userCount;
	}

	public void setUserCount(long userCount) {
		this.userCount = userCount;
	}

	public long getOrganisationCount() {
		return organisationCount;
	}

	public void setOrganisationCount(long organisationCount) {
		this.organisationCount = organisationCount;
	}

	public long getEntitlementCount() {
		return entitlementCount;
	}

	public void setEntitlementCount(long entitlementCount) {
		this.entitlementCount = entitlementCount;
	}

	public long getTargetSystemCount() {
		return targetSystemCount;
	}

	public void setTargetSystemCount(long targetSystemCount) {
		this.targetSystemCount = targetSystemCount;
	}

	public String getChecksum() {
		return checksum;
	}

	public void setChecksum(String checksum) {
		this.checksum = checksum;
	}
	

	@Override
	public int hashCode() {
		final int prime = 31;
		int result = super.hashCode();
		result = prime * result + (int) (activeUsers ^ (activeUsers >>> 32));
		result = prime * result + ((checksum == null) ? 0 : checksum.hashCode());
		result = prime * result + (int) (entitlementCount ^ (entitlementCount >>> 32));
		result = prime * result + (int) (id ^ (id >>> 32));
		result = prime * result + month;
		result = prime * result + (int) (organisationCount ^ (organisationCount >>> 32));
		result = prime * result + (int) (targetSystemCount ^ (targetSystemCount >>> 32));
		result = prime * result + (int) (userCount ^ (userCount >>> 32));
		result = prime * result + year;
		return result;
	}

	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (!super.equals(obj))
			return false;
		if (getClass() != obj.getClass())
			return false;
		SystemInfo other = (SystemInfo) obj;
		if (activeUsers != other.activeUsers)
			return false;
		if (checksum == null) {
			if (other.checksum != null)
				return false;
		} else if (!checksum.equals(other.checksum))
			return false;
		if (entitlementCount != other.entitlementCount)
			return false;
		if (id != other.id)
			return false;
		if (month != other.month)
			return false;
		if (organisationCount != other.organisationCount)
			return false;
		if (targetSystemCount != other.targetSystemCount)
			return false;
		if (userCount != other.userCount)
			return false;
		if (year != other.year)
			return false;
		return true;
	}
	

	
	
	
	
	
	
	
		

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy