All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class semper.archive.AccessName

java.lang.Object
   |
   +----semper.archive.AccessName

public class AccessName
extends Object
implements Serializable
This class implements handles associated with archived objects.
It Includes the following attributes wich are used to index the objects in the database:
- a name (String)
- optional : a serial number (long)

It is up to the archive users to construct the name to be used within the AccessName.
It is also up to the archive users to decide if they want to integrate a serial number into the access name of their stored objects. Use ArchiveMan.getSerialNumber().

Examples:

AccessName a_n_1 = new AccessName("MyPurse");
AccessName a_n_2 = new AccessName(("Certificate" + _caName + _userId"), _serialNr);
System.out.println("flattened access name : " + a_n_2.toString());
AccessName a_n_3 = new AccessName(a_n_2.name, ArchiveMan.getSerialNumber());

Version:
$Revision: 1.11 $ $Date: 1997/06/19 14:21:06 $
Author:
Marc Mazoue ([email protected])

Constructor Index

 o AccessName()
Constructor without args
 o AccessName(String)
Creates an AccessName object from the given name without a serial number
 o AccessName(String, long)
Creates an AccessName object from the given name and serial number.

Method Index

 o getName()
Returns the name attribute of the access name.
 o getSN()
Returns the serial number when the access name has one.
Returns 0 otherwise.
 o inString()
Returns a String that represents the full access name.
The name is separated from the serial number (when there is one) by the delimiter "%"
 o toString()
Returns a String that represents the full access name.
The name is separated from the serial number (when there is one) by the delimiter "%"
Overrides the toString() method of the Object class.

Constructors

 o AccessName
 public AccessName() throws ArchiveManException
Constructor without args

Throws: ArchiveManException
(for the polymorphic variant below)
 o AccessName
 public AccessName(String s) throws ArchiveManException
Creates an AccessName object from the given name without a serial number

Parameters:
s - the string used for the access name
Throws: ArchiveManException
if the String argument is null
 o AccessName
 public AccessName(String s,
                   long l) throws ArchiveManException
Creates an AccessName object from the given name and serial number.

Parameters:
s - the string used for the access name
l - the serial number
Throws: ArchiveManException
if the name String is null

Methods

 o getName
 public String getName()
Returns the name attribute of the access name.

Returns:
the name String
 o getSN
 public long getSN()
Returns the serial number when the access name has one.
Returns 0 otherwise.

Returns:
the serial number as a long integer. 0 if none.
 o inString
 public String inString()
Returns a String that represents the full access name.
The name is separated from the serial number (when there is one) by the delimiter "%"

Returns:
the flattened access name String
This is an old-fashioned method. Please use the toString method below.
 o toString
 public String toString()
Returns a String that represents the full access name.
The name is separated from the serial number (when there is one) by the delimiter "%"
Overrides the toString() method of the Object class.

Returns:
the flattened access name String
Overrides:
toString in class Object

All Packages  Class Hierarchy  This Package  Previous  Next  Index