Adobe 38043740 - ColdFusion Standard - Mac Development Manual page 653

Developing applications
Hide thumbs Also See for 38043740 - ColdFusion Standard - Mac:
Table of Contents

Advertisement

DEVELOPING COLDFUSION 9 APPLICATIONS
Flex and AIR Integration in ColdFusion
//String Primary Keys
===========
package test.apollo.CFSQLiteSupport.UUIDPK
{
[Entity]
[RemoteClass(alias="Customer")]
public class Customer
{
public function Customer()
{
}
[Id]
[GeneratedValue(strategy="UUID") ]
public var cid:String;
public var name:String;
[OneToOne(mappedBy="customer")]
public var ord:Order;
}
}
Encrypting the database
You can protect the database used by ActionScript ORM with an encryption key.
Use the
encryption key for
ByteArray
specified database file and the cache database file (used by the ActionScript ORM) are both encrypted using the
encryption key you specify.
The key is optional.
Example
dbFile = File.userDirectory.resolvePath("customerManger.db");
dbDir = File.applicationStorageDirectory;
var keyGenerator:EncryptionKeyGenerator = new EncryptionKeyGenerator();
var encryptionKey:ByteArray = keyGenerator.getEncryptionKey("UserPassword");
var sessiontoken:SessionToken
=syncmanager.openSession(dbFile,179176,encryptionKey,dbDir);
For details on
EncryptionKeyGenerator,
encryption key in Developing Adobe AIR 1.5 Applications with Flex.
Specifying the cache directory
The cache directory where you store the cache file can be specified using the
) for the
flash.filesystem.File
The
is optional.
cacheDirectory
Note: By default, the cache file used by the ActionScript ORM is stored in the File.applicationStorageDirectory (in
ColdFusion 9, it was stored in File.applicationDirectory).
For example, see
"Encrypting the
syncmanager.openSession
see the section Using the EncryptionKeyGenerator class to obtain a secure
syncmanager.openSession
database" on page 648
Last updated 1/20/2012
method to encrypt the database. The user-
cacheDirectory
method.
648
(instance of

Advertisement

Table of Contents
loading

This manual is also suitable for:

Coldfusion 9

Table of Contents