Skip to content

Commit

Permalink
annotation for ClientCapabily class
Browse files Browse the repository at this point in the history
  • Loading branch information
mbussolotto committed Feb 28, 2025
1 parent f65bf8a commit de2f2ab
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 26 deletions.

This file was deleted.

18 changes: 14 additions & 4 deletions java/code/src/com/redhat/rhn/domain/server/ClientCapability.java
Original file line number Diff line number Diff line change
Expand Up @@ -18,16 +18,26 @@

import org.apache.commons.lang3.builder.EqualsBuilder;
import org.apache.commons.lang3.builder.HashCodeBuilder;
import org.hibernate.annotations.Immutable;

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

/**
* ClientCapability
*/
@Entity
@Table(name = "rhnClientCapability")
@Immutable
public class ClientCapability extends BaseDomainHelper {

@EmbeddedId
private ClientCapabilityId id;

private long version;

@Column(name = "version", nullable = false)
private Long version = 0L;
/**
* No arg constructor needed by Hibernate.
*/
Expand Down Expand Up @@ -61,14 +71,14 @@ public void setId(ClientCapabilityId idIn) {
/**
* @return the version
*/
public long getVersion() {
public Long getVersion() {
return version;
}

/**
* @param versionIn set the version
*/
public void setVersion(long versionIn) {
public void setVersion(Long versionIn) {
this.version = versionIn;
}

Expand Down
10 changes: 10 additions & 0 deletions java/code/src/com/redhat/rhn/domain/server/ClientCapabilityId.java
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,22 @@

import java.io.Serializable;

import javax.persistence.Embeddable;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;

/**
* ClientCapabilityId
*/
@Embeddable
public class ClientCapabilityId implements Serializable {

@ManyToOne
@JoinColumn(name = "server_id", nullable = false)
private Server server;

@ManyToOne
@JoinColumn(name = "capability_name_id", nullable = false)
private Capability capability;

/**
Expand Down

0 comments on commit de2f2ab

Please sign in to comment.