<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:sy="http://purl.org/rss/1.0/modules/syndication/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" version="2.0">

<channel>
	<title>Database.com</title>
	
	<link>http://blog.database.com</link>
	<description>Blog</description>
	<lastBuildDate>Wed, 25 Jan 2012 19:12:58 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.feedburner.com/DatabaseDotComBlog" /><feedburner:info xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" uri="databasedotcomblog" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><item>
		<title>Go Mobile with Database.com</title>
		<link>http://blog.database.com/blog/2012/01/25/go-mobile-with-database-com/</link>
		<comments>http://blog.database.com/blog/2012/01/25/go-mobile-with-database-com/#comments</comments>
		<pubDate>Wed, 25 Jan 2012 19:12:58 +0000</pubDate>
		<dc:creator>Steve Bobrowski</dc:creator>
				<category><![CDATA[General]]></category>

		<guid isPermaLink="false">http://blog.database.com/?p=481</guid>
		<description><![CDATA[<a href="http://blog.database.com/blog/2012/01/25/go-mobile-with-database-com/"><img align="right" hspace="5" width="150" src="http://blogs.developerforce.com/developer-relations/files/2012/01/apps-sdk-frameworks.png" class="alignright wp-post-image tfe" alt="" title="SDK" /></a>In case you hadn&#8217;t heard, the Salesforce Mobile SDK went GA in December. How can you leverage this SDK with Database.com? The Salesforce Mobile SDK is an open-source suite of familiar technologies—like a REST API and OAuth 2.0—that you can use to build great mobile apps. It supports three development approaches for building mobile apps: native, HTML5, [...]]]></description>
			<content:encoded><![CDATA[<p>In case you hadn&#8217;t heard, the Salesforce Mobile SDK went GA in December. How can you leverage this SDK with Database.com?</p>
<p><span id="more-481"></span></p>
<p><img class="alignright" title="SDK" src="http://blogs.developerforce.com/developer-relations/files/2012/01/apps-sdk-frameworks.png" alt="" width="159" height="199" />The Salesforce Mobile SDK is an open-source suite of familiar technologies—like a REST API and OAuth 2.0—that you can use to build great mobile apps. It supports three development approaches for building mobile apps: native, HTML5, and hybrid.</p>
<ul>
<li>Native—You can code native apps for each mobile platform (e.g., Android, iOS), taking advantage of each platform&#8217;s native capabilities.</li>
<li>HTML5—You can build HTML5 apps using familiar technologies such as HTML5, CSS, and JavaScript. An HTML5 app with lightweight server-side pages typically offers the most portability (i.e., the same app can run on all platforms), but won&#8217;t be able to access native platform features.</li>
<li>Hybrid—You can create hybrid apps that use a JavaScript bridge in a native container to merge the portability of HTML5 with native device capabilities, such as the camera or address book.</li>
</ul>
<p>So how can you get started with the Mobile SDK and Database.com?</p>
<ul>
<li>Read <a title="http://wiki.developerforce.com/page/Getting_Started_with_the_Mobile_SDK_for_Android" href="http://wiki.developerforce.com/page/Getting_Started_with_the_Mobile_SDK_for_Android" rel="nofollow">Getting Started with the Mobile SDK for Android</a></li>
<li>Read <a title="http://wiki.developerforce.com/page/Getting_Started_with_the_Mobile_SDK_for_iOS" href="http://wiki.developerforce.com/page/Getting_Started_with_the_Mobile_SDK_for_iOS" rel="nofollow">Getting Started with the Mobile SDK for iOS</a></li>
<li>Register for the free <a title="Mobile SDK Webinar" href="http://www.developerforce.com/events/mobilesdk_webinars/registration.php?d=70130000000sBfh">Mobile SDK Webinar</a>, to take place on January 26, 2012.</li>
</ul>
<img src="http://feeds.feedburner.com/~r/DatabaseDotComBlog/~4/g4t11pDFpd4" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://blog.database.com/blog/2012/01/25/go-mobile-with-database-com/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>A Database.com/Force.com Foreign-Data Wrapper for PostgreSQL</title>
		<link>http://blog.database.com/blog/2011/11/21/a-database-comforce-com-foreign-data-wrapper-for-postgresql/</link>
		<comments>http://blog.database.com/blog/2011/11/21/a-database-comforce-com-foreign-data-wrapper-for-postgresql/#comments</comments>
		<pubDate>Tue, 22 Nov 2011 00:31:38 +0000</pubDate>
		<dc:creator>Pat Patterson</dc:creator>
				<category><![CDATA[General]]></category>

		<guid isPermaLink="false">http://blog.database.com/?p=470</guid>
		<description><![CDATA[<a href="http://blog.database.com/blog/2011/11/21/a-database-comforce-com-foreign-data-wrapper-for-postgresql/"><img align="right" hspace="5" width="150" src="http://blogs.developerforce.com/developer-relations/files/2011/11/Screen-shot-2011-11-20-at-4.59.42-PM.png" class="alignright wp-post-image tfe" alt="" title="" /></a>Note: This entry has been cross-posted from the Force.com blog. Dan Farina, a developer at Heroku, recently clued me in to Multicorn, a PostgreSQL 9.1+ extension for writing foreign-data wrappers in Python. Foreign-data wrappers are a mechanism for exposing external data as PostgreSQL tables, allowing that data to be queried as if it were sitting [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://multicorn.org/"><img class="alignleft size-full wp-image-6826" style="margin: 5px" src="http://blogs.developerforce.com/developer-relations/files/2011/11/Screen-shot-2011-11-20-at-4.59.42-PM.png" alt="" width="82" height="81" /></a><em>Note: This entry has been cross-posted from <a href="http://blogs.developerforce.com/">the Force.com blog</a>.</em></p>
<p><a href="https://twitter.com/#%21/danfarina">Dan Farina</a>, a developer at <a href="http://www.heroku.com/">Heroku</a>, recently clued me in to <a href="http://multicorn.org/">Multicorn</a>, a <a href="http://postgres.org/">PostgreSQL</a> 9.1+ extension for writing <a href="http://www.postgresql.org/docs/9.1/static/fdwhandler.html">foreign-data wrappers</a> in <a href="http://python.org/">Python</a>. Foreign-data wrappers are a mechanism for exposing external data as PostgreSQL tables, allowing that data to be queried as if it were sitting in PostgreSQL just like any other table. That little nugget of information, and Josh&#8217;s <a rel="bookmark" href="http://blogs.developerforce.com/developer-relations/2011/11/insanely-simple-python-rest-script.html">Insanely Simple Python REST Script</a> from earlier last week, inspired me to write my first Python script &#8211; <a href="https://github.com/metadaddy-sfdc/Database.com-FDW-for-PostgreSQL">a Multicorn foreign-data wrapper (FDW) for database.com</a> (compatible with Force.com, of course, since they share the same API).</p>
<p>The <a href="https://github.com/metadaddy-sfdc/Database.com-FDW-for-PostgreSQL/blob/master/README.md">README</a> has full instructions, but, in summary, once you have PostgreSQL 9.1 or higher, Python and Multicorn all installed, you can create a Remote Access app in database.com/Force.com, build the database.com FDW, install it in the system-wide Python distribution and start using it. We&#8217;ll pick up the story here assuming you have completed the steps mentioned above. First, create the Multicore extension and a &#8216;foreign server&#8217; in your database:</p>
<pre>CREATE EXTENSION multicorn;

CREATE SERVER multicorn_force FOREIGN DATA WRAPPER multicorn
OPTIONS (
 wrapper 'forcefdw.DatabaseDotComForeignDataWrapper'
);</pre>
<p>Now you can create a table. You can list any number of fields from a database.com sobject<del>, but field names are (currently) case-sensitive and must be quoted</del>:</p>
<pre>CREATE FOREIGN TABLE contacts (
 firstname character varying,
 lastname character varying,
 email character varying
) SERVER multicorn_force OPTIONS (
 obj_type 'Contact',
 client_id 'CONSUMER_KEY_FROM_REMOTE_ACCESS_APP',
 client_secret 'CONSUMER_SECRET_FROM_REMOTE_ACCESS_APP',
 username 'user@domain.com',
 password '********'
);</pre>
<p>At this point, you can query the foreign table as if it were  any other PostgreSQL table. Note that FDWs are read-only, so you won&#8217;t  be able to create, update or delete records.</p>
<pre>postgres=# SELECT email FROM contacts WHERE lastname LIKE 'G%';
NOTICE:  SOQL query is SELECT lastname,email FROM Contact WHERE lastname LIKE 'G%'
       email       
-------------------
 rose@edge.com
 jane_gray@uoa.edu
 agreen@uog.com
(3 rows)

postgres=# SELECT favorite_color FROM example
 JOIN contacts ON example.email=contacts.email
 WHERE contacts.firstname = 'Rose';
NOTICE:  SOQL query is SELECT lastname,email,firstname FROM Contact WHERE firstname = 'Rose'
 favorite_color
----------------
 Red
(1 row)</pre>
<p><del>Currently, the database.com FDW is very much  prototype code. The main limitation right now is that the amount of data  that you can read from database.com is somewhat limited, since the JSON  response is parsed into a Python object in memory. If this looks  interesting, then let me know in the comments and I&#8217;ll take a look at  parsing the database.com response as a stream. Alternatively, if you&#8217;re a  Pythonista and you&#8217;re interested in lending a hand, feel free to <a href="https://github.com/metadaddy-sfdc/Database.com-FDW-for-PostgreSQL">fork the project on Github</a> and get to work!</del></p>
<p><em>UPDATE  &#8211; the FDW now uses the yaml-py module to parse the JSON stream without  reading it all into memory at once, and field names are no longer case  sensitive.</em></p>
<img src="http://feeds.feedburner.com/~r/DatabaseDotComBlog/~4/k18gl3p18fY" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://blog.database.com/blog/2011/11/21/a-database-comforce-com-foreign-data-wrapper-for-postgresql/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Force.com IDE Update for Winter ’12</title>
		<link>http://blog.database.com/blog/2011/11/04/force-com-ide-update-for-winter-%e2%80%9912/</link>
		<comments>http://blog.database.com/blog/2011/11/04/force-com-ide-update-for-winter-%e2%80%9912/#comments</comments>
		<pubDate>Fri, 04 Nov 2011 16:38:46 +0000</pubDate>
		<dc:creator>Steve Bobrowski</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[tools]]></category>

		<guid isPermaLink="false">http://blog.database.com/?p=467</guid>
		<description><![CDATA[<a href="http://blog.database.com/blog/2011/11/04/force-com-ide-update-for-winter-%e2%80%9912/"><img align="right" hspace="5" width="150" src="http://wiki.developerforce.com/images/9/91/Force-ide-cloud-logo.png" class="alignright wp-post-image tfe" alt="Force.com IDE" title="" /></a>The Winter '12 release of the Force.com IDE now supports Database.com.]]></description>
			<content:encoded><![CDATA[<p><img class="alignright" src="http://wiki.developerforce.com/images/9/91/Force-ide-cloud-logo.png" alt="Force.com IDE" width="142" height="103" />The <a href="http://wiki.developerforce.com/page/Force.com_IDE_Release_Notes">Winter &#8217;12 release of the Force.com IDE</a> now supports Database.com and the latest Force.com platform features (aka API v23.0). It&#8217;s available as a downloadable installer or through an Eclipse update site. Please <a href="http://wiki.developerforce.com/page/Force.com_IDE_Release_Notes">go here</a> for complete information.</p>
<img src="http://feeds.feedburner.com/~r/DatabaseDotComBlog/~4/O5qYL1KIZAY" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://blog.database.com/blog/2011/11/04/force-com-ide-update-for-winter-%e2%80%9912/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Winter ’12: Efficient, Manageable Security Policies with Permission Sets</title>
		<link>http://blog.database.com/blog/2011/10/12/winter-%e2%80%9912-efficient-manageable-security-policies-with-permission-sets/</link>
		<comments>http://blog.database.com/blog/2011/10/12/winter-%e2%80%9912-efficient-manageable-security-policies-with-permission-sets/#comments</comments>
		<pubDate>Wed, 12 Oct 2011 15:00:42 +0000</pubDate>
		<dc:creator>Steve Bobrowski</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[cloud database]]></category>
		<category><![CDATA[Database.com]]></category>
		<category><![CDATA[Security]]></category>

		<guid isPermaLink="false">http://blog.database.com/?p=461</guid>
		<description><![CDATA[<a href="http://blog.database.com/blog/2011/10/12/winter-%e2%80%9912-efficient-manageable-security-policies-with-permission-sets/"><img align="right" hspace="5" width="150" src="http://blogs.developerforce.com/developer-relations/files/2011/10/pto-perm-set.png" class="alignright wp-post-image tfe" alt="" title="" /></a>Profiles are the foundation of any Database.com or Force.com security policy implementation. With the Winter &#8217;12 release, permission sets now complement profiles, letting you more efficiently implement and manage your organization&#8217;s security policy. Read on for a quick primer on perm sets. A Quick Review of Access Controls The profile that you assign to a [...]]]></description>
			<content:encoded><![CDATA[<p>Profiles are the foundation of any Database.com or Force.com security policy implementation. With the Winter &#8217;12 release, permission sets now complement profiles, letting you more efficiently implement and manage your organization&#8217;s security policy. Read on for a quick primer on perm sets.</p>
<p><span id="more-461"></span></p>
<h2>A Quick Review of Access Controls</h2>
<p>The profile that you assign to a user controls basic things like when the user can log in, from where, and among other things, which database objects and fields a user can access. After that, object-specific features such as organization-wide record sharing models, role hierarchies, groups, and sharing rules determine how to share records that a user owns. If you need a refresher on these concepts and features, please read <a href="http://devcenter.database.com/page/Understanding_Database.com_System_and_Data_Access_Controls">Understanding Database.com System and Data Access Controls</a>.</p>
<h2>Profiles, As They Were</h2>
<p>Before the Winter &#8217;12 release, a profile is the only feature you can use to control which database objects and fields that a profile user can access. Consequently, this leads to two unfortunate situations.</p>
<ul>
<li>When your organization has two very similar types of users that vary by even a single object or field permission, you need to create two different profiles to satisfy your requirement. Multiply this by five, ten, or more times, and you get what many administrators commonly refer to as &#8220;profile explosion.&#8221;</li>
<li>As the complexity of your organization schema grows with more and more objects and Apex classes, each profile typically becomes unwieldy as it must account for an overwhelming number of permissions.</li>
</ul>
<h2>Permission Sets to the Rescue</h2>
<p>With Winter &#8217;12, permission sets let you implement and manage security policies much more efficiently than ever before. Here&#8217;s how it works.</p>
<ol>
<li>You create a base level profile for each general type of user (administrator, app user, etc.), and for each profile, assign base level permissions that are common to all variations of the corresponding user type.</li>
<li>Create permission sets to handle exceptions to the base level permissions available via profiles.</li>
<li>Assign a user a profile and the permission sets that, together, provide the user with the permissions necessary to perform their job.</li>
</ol>
<p>Here&#8217;s another way to think about the relationship between profiles and permission sets. As you create multiple apps, it becomes easier to manage additional permissions (beyond what a profile controls) when you think about permission groupings by app rather than by user. Permission sets let you implement this type of association. For example, you might have base user profile along with the PTO manager permission set to approve PTO requests.</p>
<p style="text-align: center;"><a class="overlay" href="http://blogs.developerforce.com/developer-relations/files/2011/10/pto-perm-set.png"><img class="aligncenter size-full wp-image-6465" src="http://blogs.developerforce.com/developer-relations/files/2011/10/pto-perm-set.png" alt="" width="500" height="491" /></a></p>
<p>For a more information about permission sets, take a look at the recording of the popular Dreamforce 2011 session <a href="http://www.youtube.com/watch?v=arXxUgH9cD4">I Love Permission Sets: A Deep Dive Into Profiles 2.0</a>.</p>
<p>Enjoy!</p>
<p>[Cross-posted at <a href="http://blogs.developerforce.com">Developerforce.com</a>]</p>
<img src="http://feeds.feedburner.com/~r/DatabaseDotComBlog/~4/cQHGYUfhT8c" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://blog.database.com/blog/2011/10/12/winter-%e2%80%9912-efficient-manageable-security-policies-with-permission-sets/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Using the Database.com Java SDK</title>
		<link>http://blog.database.com/blog/2011/10/06/using-the-database-com-java-sdk/</link>
		<comments>http://blog.database.com/blog/2011/10/06/using-the-database-com-java-sdk/#comments</comments>
		<pubDate>Thu, 06 Oct 2011 17:40:47 +0000</pubDate>
		<dc:creator>Sandeep Bhanot</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[cloud database]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[JPA]]></category>
		<category><![CDATA[SDK]]></category>

		<guid isPermaLink="false">http://blog.database.com/?p=455</guid>
		<description><![CDATA[<a href="http://blog.database.com/blog/2011/10/06/using-the-database-com-java-sdk/"><img align="right" hspace="5" width="150" src="http://blogs.developerforce.com/developer-relations/files/2011/09/Picture1-300x85.png" class="alignright wp-post-image tfe" alt="" title="" /></a>There was an exciting Java-related announcement around the time of Dreamforce that you may have missed - the Beta release of the Database.com Java SDK. Read more.]]></description>
			<content:encoded><![CDATA[<p><a class="overlay" href="http://blogs.developerforce.com/developer-relations/files/2011/09/Picture1.png"><img class="alignleft size-medium wp-image-5565" src="http://blogs.developerforce.com/developer-relations/files/2011/09/Picture1-300x85.png" alt="" width="300" height="85" /></a>If you&#8217;re a Java developer reading this blog (i.e. you have some interest in the Force.com platform), you&#8217;ve probably heard of <a href="http://blog.heroku.com/archives/2011/8/25/java/" target="_blank">Java on Heroku</a> &#8211; one the biggest announcements at this year&#8217;s Dreamforce. You can now &#8220;slip the surly bonds&#8221; of your local J2EE app server by deploying your Java apps to Heroku and taking advantage of all the benefits that a polygot PAAS platform like Heroku provides. Java on Heroku has deservedly gotten a lot of attention and press and if you&#8217;re interested in learning more, check out this great <a href="http://www.youtube.com/watch?v=K9IsxnM3z8Y" target="_blank">Dreamforce session recording</a> by the very esteemed <a href="http://twitter.com/#!/_JamesWard" target="_blank">James Ward</a>. There was however another exciting Java related announcement around the time of Dreamforce that you may have missed &#8211; the <a href="http://blogs.developerforce.com/engineering/2011/08/announcing-java-spring-development-kit-for-force-com-and-database-com.html" target="_blank">Beta release of the Database.com Java SDK</a>. I&#8217;d like to spend some time talking about the SDK and so lets break it down.<span id="more-455"></span></p>
<p><strong>1) So, it&#8217;s an SDK for Database.com?</strong> &#8211; Yes and no. Even though the official name for the SDK is the &#8216;Database.com Java SDK&#8217;, you can use it to connect to <em>both</em> <a href="http://www.database.com" target="_blank">Database.com</a> and Force.com/Salesforce.</p>
<p><strong>2), Got it. So what is it?</strong> At the highest level, the SDK provides a <a href="http://download.oracle.com/javaee/6/tutorial/doc/bnbpz.html" target="_blank">JPA 2.0</a> interface to Database.com/Force.com. If allows any Java application to use Database.com or Force.com as their persistence/data layer and use the standard JPA interface provided by the SDK to query and update data from our platform. And the SDK is completely runtime agnostic in that you can deploy your application to a cloud environment that supports Java (e.g. Heroku), or to a local J2EE container &#8211; the SDK works in all cases. In addition to a JPA interface, the SDK also has a couple of other very important components/value adds.</p>
<p><strong>3) But I can already connect my Java app to Database.com/Force.com. Why do I need the SDK?</strong> &#8211; Its true that Java applications (or any other language/platform for that matter) have always been able to integrate with Force.com using one of our APIs &#8211; for e.g. the <a href="http://www.salesforce.com/us/developer/docs/api/index.htm" target="_blank">Web Services (SOAP) API</a> or the <a href="http://www.salesforce.com/us/developer/docs/api_rest/index.htm" target="_blank">REST API</a>. What&#8217;s different with the SDK is that you can now use a J2EE standard &#8211; JPA &#8211; to do the same. No WSDL/XML/JSON  to parse or consume &#8211; simply use the standard ORM functionality provided by JPA and simplify and standardize your Java code. Other than the JPA provider, the SDK also has other components that provide additional value-adds to Java developers.</p>
<p><strong>4) How is the SDK related to Java on Heroku?</strong> &#8211; As mentioned before, the SDK has absolutely no direct dependency on Java on Heroku. You can use the SDK no matter what you runtime environment. The only real intersection of the two is if you wanted to deploy a Java application to Heroku that used Database.com/Force.com as its persistence layer.</p>
<p><strong>5) What are the various components of the SDK?</strong></p>
<p><strong><em>5.1) JPA Provider</em>:</strong> The most important component of the SDK is obviously the JPA 2.0 provider. Here is quick snippet from a Java application that uses a simple &#8216;Album&#8217; Entity with a Many-to-One relationship to the &#8216;Artist&#8217; Entity.</p>
<pre>@Entity
public class Album {

    @Id
    @GeneratedValue(strategy=GenerationType.IDENTITY)
    private String id;

    private String name;

    @DateTimeFormat(iso=ISO.DATE)
    @Column(nullable = false)
    private Date releaseDate;

    @ManyToOne
    @CustomField(type= FieldType.MasterDetail)
    private Artist artist;
    ....
    //Public accessor and mutator methods for the above variables
}</pre>
<p>Anyone familiar with JPA will instantly recognize this code. JPA uses a POJO based persistence model and relies heavily on annotations &#8211; both of which you can see in the above snippet. The SDK supports most of the standard JPA annotations and adds a couple of custom ones (e.g. the &#8216;@CustomField(type= FieldType.MasterDetail)&#8217; used above). Here is another small snippet of how you can query and update data from the Album entity using the SDK.</p>
<pre>public static EntityManagerFactory emf =
                  Persistence.createEntityManagerFactory("forceDatabase");

public void saveArtistRecord(Artist artist) {
    EntityManager em = emf.createEntityManager();
    EntityTransaction tx = em.getTransaction();
    tx.begin();

    if(artist.getId()==null) {
                                em.persist(artist);
                } else {
                                artist = em.find(Artist.class, artist.getId());
                                artist =  em.merge(artist);
                }

                tx.commit();
}

public static List&lt;Album&gt; getAlbumsByName(String albumName) {
                if(albumName==null) {
                                throw new IllegalArgumentException("Album name cannot be null");
                }

                EntityManager em = emf.createEntityManager();

                String jpqlQuery = "SELECT a FROM Album a WHERE a.Name LIKE '%s'";
                jpqlQuery =        String.format(jpqlQuery,albumName);

                List&lt;Album&gt; albums = em.createQuery(jpqlQuery).getResultList();
                return albums;
}</pre>
<p>Its all standard JPA code, including the use of <a href="http://download.oracle.com/javaee/6/tutorial/doc/bnbtg.html" target="_blank">JPQL</a> (which the SDK supports) to query Database.com/Force.com data. Under the covers, the Album and Artist Entities will be mapped by the SDK to corresponding Custom Objects in the respective Database.com/Force.com Org. The SDK can even keep your data model in sync automatically. If you add a new Entity class (or a new field to an existing Entity class) and restart your application, the SDK will automatically detect these schema changes and create the custom object/field automatically in Database.com/Force.com.</p>
<p><em><strong>5.2) OAuth and Spring Security:</strong></em> The SDK also has an OAuth component that lets you delegate the authentication and authorization for your Java web app to Salesforce. You only have to configure a couple of OAuth parameters (not a single line of code required) and every time a user tries to access your Java app they will be redirected to Salesforce to login and then redirected back to your Java app. The SDK also includes a Spring Security plugin that &#8220;wraps&#8221; this OAuth component and lets you delegate security for Spring MVC apps to Salesforce.</p>
<p><strong><em>5.3) Maven Code generation plugin:</em></strong> Though not technically part of the SDK, I still see this as another component of the SDK. If you have your data model already defined in Database.com/Force.com using some Standard and/or Custom Objects, you can run a simple Maven command and generate the corresponding JPA Entity classes. This cuts down on your development time significantly.</p>
<p><strong>6) This all sounds great! How do I get started? </strong>Check out the <a href="http://forcedotcom.github.com/java-sdk/force-sdk-overview" target="_blank">SDK&#8217;s home page</a> for additional details and to get started. You can also watch a <a href="http://www.youtube.com/watch?v=C4v1XVlBlDw" target="_blank">recording of the Dreamforce session</a> where I previewed the SDK.</p>
<img src="http://feeds.feedburner.com/~r/DatabaseDotComBlog/~4/xYdwWPwmi0o" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://blog.database.com/blog/2011/10/06/using-the-database-com-java-sdk/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Winter 12 New Features Preview</title>
		<link>http://blog.database.com/blog/2011/10/05/winter-12-new-features-preview/</link>
		<comments>http://blog.database.com/blog/2011/10/05/winter-12-new-features-preview/#comments</comments>
		<pubDate>Wed, 05 Oct 2011 14:29:25 +0000</pubDate>
		<dc:creator>Steve Bobrowski</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[Database.com]]></category>
		<category><![CDATA[New Features]]></category>

		<guid isPermaLink="false">http://blog.database.com/?p=448</guid>
		<description><![CDATA[Here's a quick look at the new features you can expect to see in Database.com Winter '12.]]></description>
			<content:encoded><![CDATA[<p>Here&#8217;s a quick look at the new features you can expect to see in Database.com Winter &#8217;12. Don&#8217;t miss the other deep dive posts in this blog about various new features.</p>
<p style="text-align: center;"><iframe width="640" height="360" src="http://www.youtube.com/embed/8dP5kYoXMnE" frameborder="0" allowfullscreen></iframe></p>
<img src="http://feeds.feedburner.com/~r/DatabaseDotComBlog/~4/G_Xeoj8vEDs" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://blog.database.com/blog/2011/10/05/winter-12-new-features-preview/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>An ERD is Worth a Thousand Words: Schema Builder in Winter ’12</title>
		<link>http://blog.database.com/blog/2011/10/03/an-erd-is-worth-a-thousand-words-schema-builder-in-winter-12/</link>
		<comments>http://blog.database.com/blog/2011/10/03/an-erd-is-worth-a-thousand-words-schema-builder-in-winter-12/#comments</comments>
		<pubDate>Mon, 03 Oct 2011 17:16:39 +0000</pubDate>
		<dc:creator>Steve Bobrowski</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[New Features]]></category>

		<guid isPermaLink="false">http://blog.database.com/?p=440</guid>
		<description><![CDATA[<a href="http://blog.database.com/blog/2011/10/03/an-erd-is-worth-a-thousand-words-schema-builder-in-winter-12/"><img align="right" hspace="5" width="150" src="http://blog.database.com/wp-content/uploads/2011/10/schema-builder-300x171.png" class="alignright wp-post-image tfe" alt="Schema Builder" title="Schema Builder" /></a>Lots of you can't wait to get your hands on the new Schema Builder that will officially become available in the Winter '12 release of Force.com and Database.com. This post is a quick preview of the new tool.]]></description>
			<content:encoded><![CDATA[<p>Lots of you can&#8217;t wait to get your hands on the new Schema Builder that will officially become available in the Winter &#8217;12 release of Force.com and Database.com. This post is a quick preview of the new tool.<span id="more-440"></span></p>
<p>Visualizing and documenting Force.com and Database.com schemas just got a whole lot easier with the Beta availability of the new Schema Builder tool that&#8217;s accessible from each product&#8217;s primary console. To access the tool from each product&#8217;s console, click the new Schema Builder link in the App Setup menu and your off and running.</p>
<div id="attachment_441" class="wp-caption aligncenter" style="width: 310px"><a href="http://blog.database.com/wp-content/uploads/2011/10/schema-builder.png"><img class="size-medium wp-image-441" title="Schema Builder" src="http://blog.database.com/wp-content/uploads/2011/10/schema-builder-300x171.png" alt="Schema Builder" width="300" height="171" /></a><p class="wp-caption-text">Click to enlarge this image.</p></div>
<h2>Displaying Objects and Relationships</h2>
<p>The controls in the left sidebar let you select the objects that you want to display in the canvas to the right. Use the sidebar option list to control the objects to display for selection below, and then just check the ones you want to see on the canvas. Once you pick the objects that you want to see, use the Auto-Layout button to visually reorganize them on the canvas.</p>
<p>Schema Builder also represents relationships among objects that are on the canvas. Lookup relationships are blue lines while Master-Detail relationships are red lines. When you hold you mouse over a particular relationship, a pop-up appears to reveal more information about the relationship.</p>
<p>When you close the Schema Builder with the Close button, the tool automatically saves the view of the objects you have selected for display.</p>
<h2>Refining Your View</h2>
<p>There are a few ways to refine the view of the objects on the canvas.</p>
<ul>
<li>Above the left sidebar there&#8217;s a View Options list. Use Display Element Labels/Names to toggle between field labels and API names; use Show/Hide Relationships to toggle relationship connectors on and off; and use Show/Hide Legend to toggle the display of the legend for canvas symbols.</li>
<li>On the right edge of the canvas, use the zoom control to increase or decrease the field of focus of the canvas. I also found that I can use my mouse&#8217;s scroll wheel to accomplish the same task.</li>
<li>On the lower right corner of the canvas, drag the focus window to the area of the canvas that you want to display.</li>
<li>In the canvas itself, click a blank area and drag the canvas to pan your display.</li>
</ul>
<h2>Drilling Into Objects</h2>
<p>While the first version of Schema Builder is read-only, we’ve provided easy methods to get to your field and object details so that you can modify them as needed. For example, you can quickly drill down into a particular object as follows.</p>
<ul>
<li>In the upper right corner of an object, click the icon and then View Object in New Window to display a new browser window/tab with the object&#8217;s detail page.</li>
<li>Click a field label/name to display a new browser window/tab with the field&#8217;s detail page.</li>
</ul>
<p>In either case, use the normal console techniques to modify the object or particular field.</p>
<h2>Printing Your Diagrams</h2>
<p>I&#8217;ve talked with many users that are looking forward to using Schema Builder as a tool for documenting their schemas. Currently, there&#8217;s no built in printing function. As a workaround, just use your favorite screen capture utility (my favorites are Shutter on Linux and Skitch on Mac).</p>
<h2>Sending Us Feedback</h2>
<p>This is the first release of Schema Builder, and we want it to meet your needs. So please use the link in the upper right corner above the canvas to <a title="Schema Builder on IdeaExchange" href="http://success.salesforce.com/ideaView?c=09a30000000D9xtAAC&amp;id=08730000000aGMBAA2">provide us with feedback via IdeaExchange</a>.</p>
<img src="http://feeds.feedburner.com/~r/DatabaseDotComBlog/~4/ApOSQ23Odk8" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://blog.database.com/blog/2011/10/03/an-erd-is-worth-a-thousand-words-schema-builder-in-winter-12/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Let There Be Light</title>
		<link>http://blog.database.com/blog/2011/09/28/let-there-be-light/</link>
		<comments>http://blog.database.com/blog/2011/09/28/let-there-be-light/#comments</comments>
		<pubDate>Wed, 28 Sep 2011 14:37:43 +0000</pubDate>
		<dc:creator>Steve Bobrowski</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[Database.com]]></category>
		<category><![CDATA[New Features]]></category>
		<category><![CDATA[Security]]></category>

		<guid isPermaLink="false">http://blog.database.com/?p=431</guid>
		<description><![CDATA[<a href="http://blog.database.com/blog/2011/09/28/let-there-be-light/"><img align="right" hspace="5" width="150" src="http://blogs.developerforce.com/developer-relations/files/2011/09/Blue-Sky-Sun-Ray-Clouds-300x225.jpg" class="alignright wp-post-image tfe" alt="" title="" /></a>With the Winter Release '11 of Database.com comes the general availability of a "Light" user license. What is a Database.com Light license? For those new to Database.com, perhaps this question is best answered in the broader context of Database.com security.]]></description>
			<content:encoded><![CDATA[<p><img class="alignright size-medium wp-image-5516" src="http://blogs.developerforce.com/developer-relations/files/2011/09/Blue-Sky-Sun-Ray-Clouds-300x225.jpg" alt="" width="240" height="180" />With the Winter Release &#8217;12 of Database.com comes the general availability of a &#8220;Light&#8221; user license. What is a Database.com Light license? For those new to Database.com, perhaps this question is best answered in the broader context of Database.com security.</p>
<p><span id="more-431"></span></p>
<p>When you configure a Database.com security policy, you&#8217;ll start by building user profiles. The available permissions you can configure for a profile depend on the user license you associate with the profile.</p>
<p>For example, system administrator profiles use the <em>Database.com Admin</em> license, the only type of license that provides access to powerful, system-level access controls. Non-administrator profiles use the Database.com User license or the Database.com Light license. Assuming you understand the mechanisms for controlling system and data access within Database.com, here&#8217;s a quick summary of the difference between these user licenses.</p>
<ul>
<li>A standard <em>Database.com User </em>license is subject to all Database.com security controls, including authentication, profiles (system and object-level data access controls), and record sharing/row-level data access controls. When you want to leverage Database.com’s supported, scalable, fine-grained data access controls for record sharing, consider this type of user license for your app users.</li>
<li>A <em>Database.com Light </em>user license is subject to Database.com authentication and profiles, but not to record-level data sharing controls. When your app doesn’t require record-level data access controls, or your team is comfortable with building and maintaining such controls in the application itself, then consider lower-cost light users.</li>
</ul>
<p>In summary, with the Database.com User license, you get a powerful set of organizational structures and security mechanisms ideal for the construction of enterprise applications that have stringent security requirements. With Database.com Light, you get lower cost for applications that may be less structured or more consumer oriented.</p>
<p>Please see the <a href="https://na1.salesforce.com/help/doc/en/salesforce_winter12_release_notes.pdf">Winter &#8217;12 release notes</a> for more information.</p>
<p>[Cross-posted at the <a title="Force.com Blogs" href="http://blogs.developerforce.com">Force.com Blogs</a>]</p>
<img src="http://feeds.feedburner.com/~r/DatabaseDotComBlog/~4/RM4Ri6iMYHI" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://blog.database.com/blog/2011/09/28/let-there-be-light/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>TechGate 2011 and Database.com</title>
		<link>http://blog.database.com/blog/2011/09/15/techgate-2011-and-database-com/</link>
		<comments>http://blog.database.com/blog/2011/09/15/techgate-2011-and-database-com/#comments</comments>
		<pubDate>Thu, 15 Sep 2011 16:16:17 +0000</pubDate>
		<dc:creator>Steve Bobrowski</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[cloud database]]></category>
		<category><![CDATA[Database.com]]></category>
		<category><![CDATA[DbaaS]]></category>

		<guid isPermaLink="false">http://blog.database.com/?p=425</guid>
		<description><![CDATA[<a href="http://blog.database.com/blog/2011/09/15/techgate-2011-and-database-com/"><img align="right" hspace="5" width="150" src="http://www.nps.gov/ncr/wamo/images/WAMO_wamomainweb.jpg" class="alignright wp-post-image tfe" alt="" title="Washington Monument" /></a>TechGate 2011 is Saturday September 17, 2011. Learn about technology from salesforce.com, Amazon Web Services, Microsoft, RightScale and many others at this unique Capital area event.]]></description>
			<content:encoded><![CDATA[<p><img class="alignright" title="Washington Monument" src="http://www.nps.gov/ncr/wamo/images/WAMO_wamomainweb.jpg" alt="" width="375" height="180" />Just because the <a title="Washington Monument" href="http://www.nps.gov/wamo/index.htm" target="_blank">Washington Monument is temporarily closed</a> doesn&#8217;t mean that you shouldn&#8217;t be going to the Washington DC area this weekend! Why? For <a title="Techgate 2011" href="http://techgate.cloudapp.net/" target="_blank">TechGate 2011</a>, of course.</p>
<p>TechGate, Saturday September 17 2011, brings together several of the Capital area&#8217;s finest technology user groups into one great event. I&#8217;ll be there, providing you with an under-the-hood look at the multitenancy magic that powers Database.com and Force.com, including a demo of our newly released cloud database service. And there&#8217;ll also be speakers from Amazon Web Services, Microsoft, RightScale, and many others to give you the latest scoop on various technologies. There&#8217;s sure to be something of interest for everyone.</p>
<p>Please feel free to ping me <a title="Database.com on Twitter" href="http://twitter.com/#!/databasedotcom" target="_blank">@databasedotcom</a> if you have any questions. See you on Saturday.</p>
<img src="http://feeds.feedburner.com/~r/DatabaseDotComBlog/~4/M2McAbEEAKk" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://blog.database.com/blog/2011/09/15/techgate-2011-and-database-com/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>We Built It and They Came</title>
		<link>http://blog.database.com/blog/2011/09/09/we-built-it-and-they-came/</link>
		<comments>http://blog.database.com/blog/2011/09/09/we-built-it-and-they-came/#comments</comments>
		<pubDate>Fri, 09 Sep 2011 15:12:07 +0000</pubDate>
		<dc:creator>Steve Bobrowski</dc:creator>
				<category><![CDATA[General]]></category>

		<guid isPermaLink="false">http://blog.database.com/?p=393</guid>
		<description><![CDATA[<a href="http://blog.database.com/blog/2011/09/09/we-built-it-and-they-came/"><img align="right" hspace="5" width="150" src="http://blog.database.com/wp-content/uploads/2011/09/IMG_2782-150x150.jpg" class="alignright wp-post-image tfe" alt="Click to enlarge" title="Database.com is Live!" /></a>We built it and they came! Database.com was announced at Dreamforce 2011. Here are a few photos to relive the experience.]]></description>
			<content:encoded><![CDATA[<p><a href="http://blog.database.com/wp-content/uploads/2011/09/IMG_2782.jpg" target="_blank"><img class="alignright size-thumbnail wp-image-407" title="Database.com is Live!" src="http://blog.database.com/wp-content/uploads/2011/09/IMG_2782-150x150.jpg" alt="Click to enlarge" width="96" height="96" /></a>You know that familiar misquotation* &#8220;build it and they will come.&#8221; Well, we did build it and they did come. There was a tremendous response to the <a title="Database.com is Open for Business" href="http://blog.database.com/blog/2011/08/30/database-com-is-open-for-business/">general availability announcement</a> of Database.com at <a title="Dreamforce 2011" href="http://www.salesforce.com/dreamforce/DF11/">Dreamforce 2011</a>. <em>What a buzz!</em> Database.com is live!</p>
<p>For those of you that couldn&#8217;t attend Dreamforce 2011 and for those of you that want to relive the experience, here are a few photos from the Database.com stations in the DevZone.</p>
<p>* The correct quote is actually &#8220;if you build it, he will come&#8221; from the movie <a title="Field of Dreams" href="http://en.wikipedia.org/wiki/If_you_build_it,_he_will_come">Field of Dreams</a>.</p>
<p><a href="http://blog.database.com/wp-content/uploads/2011/09/IMG_2791.jpg" target="_blank"><img class="size-medium wp-image-394 alignnone" title="Database.com at Dreamforce 2011 #1" src="http://blog.database.com/wp-content/uploads/2011/09/IMG_2791-300x200.jpg" alt="Click to enlarge" width="270" height="180" /></a> <a href="http://blog.database.com/wp-content/uploads/2011/09/IMG_2792.jpg" target="_blank"><img class="alignnone size-medium wp-image-399" title="Database.com at Dreamforce 2011 #2" src="http://blog.database.com/wp-content/uploads/2011/09/IMG_2792-300x200.jpg" alt="Click to enlarge" width="270" height="180" /></a> <a href="http://blog.database.com/wp-content/uploads/2011/09/IMG_2803.jpg" target="_blank"><img class="alignnone size-medium wp-image-400" title="Database.com at Dreamforce 2011 #3" src="http://blog.database.com/wp-content/uploads/2011/09/IMG_2803-300x200.jpg" alt="Click to enlarge" width="270" height="180" /></a></p>
<img src="http://feeds.feedburner.com/~r/DatabaseDotComBlog/~4/UfKWbK7QsHM" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://blog.database.com/blog/2011/09/09/we-built-it-and-they-came/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

