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)
Initializes a new instance with a given environment.

Method Summary
public boolean delete(String iRepo, String iName)
Removes an attribute from the repository given the attribute name.
public boolean getBoolean(String iRepo, String iName, boolean iDefault)
Returns the attribute value of type boolean given a repository and a parameter name.
public double getDouble(String iRepo, String iName, double iDefault)
Returns the attribute value of type double given a repository and a parameter name.
public int getInt(String iRepo, String iName, int iDefault)
Returns the attribute value of type int given a repository and a parameter name.
public long getLong(String iRepo, String iName, long iDefault)
Returns the attribute value of type long given a repository and a parameter name.
public String getString(String iRepo, String iName, String iDefault)
Returns the attribute value of type String given a repository and a parameter name.
public void saveRepo(String iRepo)
Validates attributes modifications and stores them in the database persistency.
public void setBoolean(String iRepo, String iName, boolean iValue)
Sets an attribute value of type boolean given a repository and a parameter name.
public void setDouble(String iRepo, String iName, double iValue)
Sets an attribute value of type double given a repository and a parameter name.
public void setInt(String iRepo, String iName, int iValue)
Sets an attribute value of type int given a repository and a parameter name.
public void setLong(String iRepo, String iName, long iValue)
Sets an attribute value of type long given a repository and a parameter name.
public void setString(String iRepo, String iName, String iValue)
Sets an attribute value of type String given a repository and a parameter name.


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

delete

    public 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.
Return:
the deletion status (true or false).

getBoolean

    public 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.
Return:
the attribute value the attribute value.

getDouble

    public 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.
Return:
the attribute value the attribute value.

getInt

    public 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.
Return:
the attribute value the attribute value.

getLong

    public 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.
Return:
the attribute value the attribute value.

getString

    public 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.
Return:
the attribute value the attribute value.

saveRepo

    public void saveRepo(String iRepo)

Validates attributes modifications and stores them in the database persistency.

Parameters:
iRepo
the repository name.

setBoolean

    public 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.
Throws:
CATSettingException - thrown if an error occurs while trying to set the attribute value.

setDouble

    public 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.
Throws:
CATSettingException - thrown if an error occurs while trying to set the attribute value.

setInt

    public 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.
Throws:
CATSettingException - thrown if an error occurs while trying to set the attribute value.

setLong

    public 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.
Throws:
CATSettingException - thrown if an error occurs while trying to set the attribute value.

setString

    public 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.
Throws:
CATSettingException - thrown if an error occurs while trying to set the attribute value.


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