Skip to content

Commit

Permalink
RANGER-5061: checkstyle compliance updates - security-admin modules :…
Browse files Browse the repository at this point in the history
… org.apache.ranger.entity package (#504)
  • Loading branch information
pradeepagrawal8184 committed Jan 13, 2025
1 parent 10cc6b5 commit 376b2af
Show file tree
Hide file tree
Showing 103 changed files with 18,158 additions and 19,161 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,94 +17,109 @@
* under the License.
*/

package org.apache.ranger.entity;
package org.apache.ranger.entity;

/**
* Access Audit
*
*/

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;

import java.util.Objects;

@Entity
@Table(name="xa_access_audit")
@Table(name = "xa_access_audit")
public class XXAccessAudit extends XXAccessAuditBase implements java.io.Serializable {
private static final long serialVersionUID = 1L;

@Column(name="SEQ_NUM")
protected long sequenceNumber;

@Column(name="EVENT_COUNT")
protected long eventCount;

//event duration in ms
@Column(name="EVENT_DUR_MS")
protected long eventDuration;

public long getSequenceNumber() {
return sequenceNumber;
}
public void setSequenceNumber(long sequenceNumber) {
this.sequenceNumber = sequenceNumber;
}
public long getEventCount() {
return eventCount;
}
public void setEventCount(long eventCount) {
this.eventCount = eventCount;
}
public long getEventDuration() {
return eventDuration;
}
public void setEventDuration(long eventDuration) {
this.eventDuration = eventDuration;
}

@Column(name="tags")
protected String tags;
/**
* @return the tags
*/
public String getTags() {
return tags;
}
/**
* @param tags the tags to set
*/
public void setTags(String tags) {
this.tags = tags;
}
/**
* This return the bean content in string format
* @return formatedStr
*/
@Override
public String toString( ) {
String str = super.toString();
str += "sequenceNumber={" + sequenceNumber + "}";
str += "eventCount={" + eventCount + "}";
str += "eventDuration={" + eventDuration + "}";
str += "tags={" + tags + "}";
return str;
}

/**
* Checks for all attributes except referenced db objects
* @return true if all attributes match
*/
@Override
public boolean equals( Object obj) {
if ( !super.equals(obj) ) {
return false;
}
XXAccessAudit other = (XXAccessAudit) obj;
if ((this.tags == null && other.tags != null) || (this.tags != null && !this.tags.equals(other.tags))) {
return false;
}
return true;
}
private static final long serialVersionUID = 1L;

@Column(name = "SEQ_NUM")
protected long sequenceNumber;

@Column(name = "EVENT_COUNT")
protected long eventCount;

//event duration in ms
@Column(name = "EVENT_DUR_MS")
protected long eventDuration;

@Column(name = "tags")
protected String tags;

public long getSequenceNumber() {
return sequenceNumber;
}

public void setSequenceNumber(long sequenceNumber) {
this.sequenceNumber = sequenceNumber;
}

public long getEventCount() {
return eventCount;
}

public void setEventCount(long eventCount) {
this.eventCount = eventCount;
}

public long getEventDuration() {
return eventDuration;
}

public void setEventDuration(long eventDuration) {
this.eventDuration = eventDuration;
}

/**
* @return the tags
*/
public String getTags() {
return tags;
}

/**
* @param tags the tags to set
*/
public void setTags(String tags) {
this.tags = tags;
}

@Override
public int hashCode() {
return super.hashCode();
}

/**
* Checks for all attributes except referenced db objects
*
* @return true if all attributes match
*/
@Override
public boolean equals(Object obj) {
if (this == obj) {
return true;
} else if (!super.equals(obj)) {
return false;
}

XXAccessAudit other = (XXAccessAudit) obj;

return Objects.equals(tags, other.tags);
}

/**
* This return the bean content in string format
*
* @return formatedStr
*/
@Override
public String toString() {
String str = super.toString();
str += "sequenceNumber={" + sequenceNumber + "}";
str += "eventCount={" + eventCount + "}";
str += "eventDuration={" + eventDuration + "}";
str += "tags={" + tags + "}";
return str;
}
}
Loading

0 comments on commit 376b2af

Please sign in to comment.