RDS CRUD wizard
The Remote Development Services (RDS)
CRUD Wizard lets you dynamically create a ColdFusion component (CFC)
based on a table that is registered in the ColdFusion Administrator
on a ColdFusion server. To use the RDS CRUD wizard, you must have
the Eclipse RDS Support plug-in installed. (The Eclipse RDS Support
plug-in is installed when you install the ColdFusion wizards.)
The RDS CRUD Wizard lets you create the following types of CFCs:
ActiveRecord style CRUD CFC, which includes all of the
properties, get and set methods, and SQL methods in one CFC. The
CFC includes the following methods:
init()
or init(primary key value)
load(primary key value)
save()
delete()
Bean/DAO style CRUD CFCs, which creates two related CFCs:
A Bean CFC, also called a Value Object, which contains the
property definitions and get and set methods.
The DAO CFC, which contains the following methods:
read(primary key value)
create(cfc instance)
update(cfc instance)
delete(cfc instance)
Data Service assembler CFC, which includes a Bean (also referred
to as a Value Object), a DAO CFC, and an assembler CFC. The assembler
CFC is required to take advantage of the Flex Data Services feature
Use the RDS CRUD wizard
In Flash Builder or Eclipse, go to the RDS Dataview
by doing the following:
Select Window > Show View
> Other.
Select RDS.
Select RDS Dataview.
Right click a table name.
Select ColdFusion Wizards > Create CFC.
Enter the project folder where you want to save the CFC in
the CFC Folder text box.
Enter the CFC package in the CFC Package Name text box.
(Optional) Select the Primary Key column if a primary key
is not defined in the database.
(Optional) To specify the primary key column in addition
to the other values specified in the CFC, select the Primary Key
is Controlled by the User option. If the primary key is automatically
generated by the database (the identity field), do not select this
option.
To replace existing files, select the Overwrite Files If
They Already Exist option.
Select one of the following CFC Types:
Enter the names of the CFCs in the appropriate text boxes.
To create an ActionScript Value Object:
Select
the Create an ActionScript Value Object in Addition to the CFCs option.
Enter the location for the ActionScript Value Object in the
AS Folder text box, or click Browse to browse to the location.
To create get and set methods in the ActionScript Class file,
select Generate Get/Set Methods.
Click Finish.