/** * Get the {@link DataSource} object associated with the only relational database service bound to the app. * * This is equivalent to the {@code <cloud:data-source/>} element. * * @return data source * @throws CloudException * if there are either 0 or more than 1 relational database services. */ @Override public DataSource dataSource() { return dataSource((DataSourceConfig) null); }
/** * Get the {@link DataSource} object associated with the only relational database service bound to the app. * * This is equivalent to the {@code <cloud:data-source/>} element. * * @return data source * @throws CloudException * if there are either 0 or more than 1 relational database services. */ @Override public DataSource dataSource() { return dataSource((DataSourceConfig) null); }
/** * Get the {@link DataSource} object for the specified relational database service. * * This is equivalent to the {@code <cloud:data-source service-id="serviceId"/>} * * @param serviceId * the name of the service * @return data source * @throws CloudException * if the specified service doesn't exist */ @Override public DataSource dataSource(String serviceId) { return dataSource(serviceId, null); }
/** * Get the {@link DataSource} object for the specified relational database service. * * This is equivalent to the {@code <cloud:data-source service-id="serviceId"/>} * * @param serviceId * the name of the service * @return data source * @throws CloudException * if the specified service doesn't exist */ @Override public DataSource dataSource(String serviceId) { return dataSource(serviceId, null); }