Project class

Package: com.tecit.TFORMer.Repository

Provides access to project information in a Repository or a stand-alone FormLayout.

Usage and notes

This class is used to retrieve or set information belonging to a user-defined Project or to the GlobalProject.

Overview

A Project is a logical container for related FormLayout, DataSource and DataField definitions. It divides a Repository into logical units.

Exactly one GlobalProject is available for both a Repository or a stand-alone FormLayout. In the case of a Repository additional Project objects can be created by the user.

  • For each Project TFORMer Designer creates a subfolder below the main Repository file. FormLayouts, which are member of this Project are stored in this subfolder.

  • A stand-alone FormLayout can only use the GlobalProject (it references the FormLayout itself). The GlobalProject of a Repository can't be used to reference FormLayouts.

  • DataFields and DataSources defined in a Project are usable exclusively by FormLayouts which are member exactly of this Project.

  • DataFields and DataSources defined in the GlobalProject are usable by all FormLayouts in all Projects.

Working with Data Fields

Example

To retrieve all Project objects within a Repository do the following:

  // Retrieve the first Project 
  Project project = repository.getFirstProject ();

  while (project != null)
  {
    System.out.println (project.toString());

    // Get the next Project 
    project = project.getNext ();
  } 

Attention

The Project is only valid as long as it is available in the Repository. If it is removed from the Repository all instances of the Project immediately become invalid.

More Information

GlobalProject

Note

Thread-safety: A single instance of this class must not be used by different threads.

Methods

MemberDescription
addDataField(String)Returns: DataField

Creates and adds a DataField to the Project.

addDataSource(DataSourceType, String)Returns: DataSource

Creates and adds a DataSource to the Project.

addFormLayout(String)Returns: FormLayout

Creates and adds a FormLayout to the Project.

dispose()Returns: void

Releases the resources allocated by this instance.

dump(PrintStream)Returns: void

Dumps the current instance into a text stream.

getComment()Returns: String

Gets the comment for the Project.

getDataField(String)Returns: DataField

Gets the DataField information from the Project.

getDataSource(String)Returns: DataSource

Gets the DataSource information from the Project.

getDefaultDirectory()Returns: String

Gets the default directory of the Project.

getDescription()Returns: String

Gets the description of the Project.

getFirstDataField()Returns: DataField

Gets the first DataField of the Project.

getFirstDataSource()Returns: DataSource

Gets the first DataSource defined in the Project.

getFirstFormLayout()Returns: FormLayout

Gets the first FormLayout of the Project.

getFormLayout(String)Returns: FormLayout

Gets the FormLayout information from the Project.

getName()Returns: String

Gets the name of the Project.

getNext()Returns: Project

Gets the next Project defined in the Repository.

getNumberOfDataFields()Returns: int

Gets the number of DataFields defined in the Project.

getNumberOfDataSources()Returns: int

Gets the number of DataSources defined in the Project.

getNumberOfFormLayouts()Returns: int

Gets the number of FormLayouts defined in this Project.

getRepository()Returns: Repository

Return the repository in which the project is defined.

removeDataField(DataField)Returns: void

Removes a DataField from the Project.

removeDataField(String)Returns: void

Removes a DataField from the Project.

removeDataSource(DataSource)Returns: void

Removes the DataSource from the Project.

removeDataSource(String)Returns: void

Removes the DataSource from the Project.

removeFormLayout(FormLayout)Returns: void

Removes a FormLayout from the Project.

removeFormLayout(String)Returns: void

Removes a FormLayout from the Project.

setComment(String)Returns: void

Sets the comment for the Project.

setDescription(String)Returns: void

Sets the description of the Project.

setName(String)Returns: void

Sets the name of the Project.

toString()Returns: String

Returns a string representation of the instance.

Search documentation

Search in
More scopes
Additional scopes

All contents