The CRight class

The CRight class contains the data for a user right.

The following data fields are included:

  • The ID (String)
  • The description (String)
  • A flag that indicates whether this right should be protected against deletion (boolean)

fromRecord

The method creates an instance of the CRight class from a record of the type CRecordUserDbRightRecord.

@NotNull
public static CRight fromRecord(@NotNull final CRecord aRecord) throws CException;

toRecord

The method creates a record of the type CRecordUserDbRightRecord from an instance of the CRight class.

@NotNull
public CRecord toRecord() throws CException;

toStream

The method writes an instance of the CRight class to a DataOutputStream.

public void toStream(@NotNull final DataOutputStream aStream) throws IOException;

fromStream

The method reads a CRight class from a DataInputStream.

@NotNull
public static CRight fromStream(@NotNull final DataInputStream aStream) throws IOException, CException;

Miscellaneous

The class supports equals() and hashcode().
It implements Comparable<CRight>.

See also