Package com.dassault_systemes.catjsystem

   
Class CATSetting

 
Class Hierarchy
java.lang.Object
  |
  +-com.dassault_systemes.catjsystem.CATSetting
Class Location

Framework : CATJSystem

Module : CATJSystem

Class Description

public class CATSetting

An object that enables the storage of settings for the application in the database persistency.

A CATSetting instance can be used to several attribute values and store them into a repository identified by a name.

Field Summary

Constructor Summary
CATSetting(CATEnvironment iEnv, boolean iAdministrator)

Method Summary
String getString(String iRepo, String iName, String iDefault)
int getInt(String iRepo, String iName, int iDefault)
boolean getBoolean(String iRepo, String iName, boolean iDefault)
double getDouble(String iRepo, String iName, double iDefault)
long getLong(String iRepo, String iName, long iDefault)
void setString(String iRepo, String iName, String iValue)
void setLong(String iRepo, String iName, long iValue)
void setDouble(String iRepo, String iName, double iValue)
void setBoolean(String iRepo, String iName, boolean iValue)
void setInt(String iRepo, String iName, int iValue)
void saveRepo(String iRepo)
boolean delete(String iRepo, String iName)


Field Detail

Constructor Detail

CATSetting

    CATSetting(CATEnvironment iEnv, boolean iAdministrator)

Initializes a new instance with a given environment.

The environment required can be retrieved through a CATSession instance using the following method: CATSession.getEnv().

A CATSetting instance can be used to manipulate the setting content.

Parameters:
iEnv
the CATEnvironment instance
iAdministrator
administration mode if true

Method Detail

getString

    String getString(String iRepo, String iName, String iDefault)

Returns the attribute value of type String given a repository and a parameter name.

Parameters:
iRepo
the repository name.
iName
the attribut name.
iDefault
the default value to return if the attribute cannot be found.
Returns:
the attribute value the attribute value.

getInt

    int getInt(String iRepo, String iName, int iDefault)

Returns the attribute value of type int given a repository and a parameter name.

Parameters:
iRepo
the repository name.
iName
the attribute name.
iDefault
the default value to return if the attribute cannot be found.
Returns:
the attribute value the attribute value.

getBoolean

    boolean getBoolean(String iRepo, String iName, boolean iDefault)

Returns the attribute value of type boolean given a repository and a parameter name.

Parameters:
iRepo
the repository name.
iName
the attribute name.
iDefault
the default value to return if the attribute cannot be found.
Returns:
the attribute value the attribute value.

getDouble

    double getDouble(String iRepo, String iName, double iDefault)

Returns the attribute value of type double given a repository and a parameter name.

Parameters:
iRepo
the repository name.
iName
the attribute name.
iDefault
the default value to return if the attribute cannot be found.
Returns:
the attribute value the attribute value.

getLong

    long getLong(String iRepo, String iName, long iDefault)

Returns the attribute value of type long given a repository and a parameter name.

Parameters:
iRepo
the repository name.
iName
the attribute name.
iDefault
the default value to return if the attribute cannot be found.
Returns:
the attribute value the attribute value.

setString

    void setString(String iRepo, String iName, String iValue)

Sets an attribute value of type String given a repository and a parameter name.

Parameters:
iRepo
the repository name.
iName
the attribute name.
iValue
the attribute value.

setLong

    void setLong(String iRepo, String iName, long iValue)

Sets an attribute value of type long given a repository and a parameter name.

Parameters:
iRepo
the repository name.
iName
the attribute name.
iValue
the attribute value.

setDouble

    void setDouble(String iRepo, String iName, double iValue)

Sets an attribute value of type double given a repository and a parameter name.

Parameters:
iRepo
the repository name.
iName
the attribute name.
iValue
the attribute value.

setBoolean

    void setBoolean(String iRepo, String iName, boolean iValue)

Sets an attribute value of type boolean given a repository and a parameter name.

Parameters:
iRepo
the repository name.
iName
the attribute name.
iValue
the attribute value.

setInt

    void setInt(String iRepo, String iName, int iValue)

Sets an attribute value of type int given a repository and a parameter name.

Parameters:
iRepo
the repository name.
iName
the attribute name.
iValue
the attribute value.

saveRepo

    void saveRepo(String iRepo)

Validates attributes modifications and stores them in the database persistency.

Parameters:
iRepo
the repository name.

delete

    boolean delete(String iRepo, String iName)

Removes an attribute from the repository given the attribute name.

Parameters:
iRepo
the repository name.
iName
the attribut name.
Returns:
the deletion status (true or false).


Copyright © 2000, Dassault Systèmes. All rights reserved