Codota Logo
SrvOrmPostgresql
Code IndexAdd Codota to your IDE (free)

How to use
SrvOrmPostgresql
in
org.beigesoft.orm.service

Best Java code snippets using org.beigesoft.orm.service.SrvOrmPostgresql (Showing top 4 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
DateTime d =
  • Codota Iconnew DateTime()
  • Codota IconDateTimeFormatter formatter;String text;formatter.parseDateTime(text)
  • Codota IconObject instant;new DateTime(instant)
  • Smart code suggestions by Codota
}
origin: org.beigesoft/beige-web-jar

/**
 * <p>Instantiate ORM  service.</p>
 * @return SrvOrmPostgresql - ORM  service
 */
@Override
public final synchronized SrvOrmPostgresql<ResultSet> instantiateSrvOrm() {
 return new SrvOrmPostgresql<ResultSet>();
}
origin: org.beigesoft/beige-orm

public final <T> void insertEntity(
 final T pEntity) throws Exception {
 ColumnsValues columnsValues = evalColumnsValuesAndFillNewVersion(pEntity);
 String idName = columnsValues.getIdName();
 if (idName != null) { // if non-complex PK
  Field fieldId = getUtlReflection()
       .retrieveField(pEntity.getClass(),
       idName);
    String query = getHlpInsertUpdate().evalSqlInsert(
     pEntity.getClass().getSimpleName().toUpperCase(), columnsValues);
    recordSet = getSrvDatabase().retrieveRecords(query
     + " returning " + idName.toUpperCase() + ";\n");
    recordSet.moveToFirst();
    if (fieldId.getType() == Long.class) {
     fieldId.set(pEntity, getSrvRecordRetriever()
      .getLong(recordSet.getRecordSet(), idName));
    } else if (fieldId.getType() == Integer.class) {
     fieldId.set(pEntity, getSrvRecordRetriever()
      .getInteger(recordSet.getRecordSet(), idName));
    } else {
 long result = getSrvDatabase().executeInsert(
  pEntity.getClass().getSimpleName().toUpperCase(), columnsValues);
 if (result != 1) {
  String query = getHlpInsertUpdate().evalSqlInsert(pEntity.getClass()
   .getSimpleName().toUpperCase(), columnsValues);
  throw new ExceptionWithCode(ISrvDatabase.ERROR_INSERT_UPDATE,
origin: org.beigesoft/beigesoft-orm

public final <T> void insertEntity(final Map<String, Object> pAddParam,
 final T pEntity) throws Exception {
 ColumnsValues columnsValues = evalColumnsValues(pAddParam, pEntity);
 String[] idName = columnsValues.getIdColumnsNames();
 if (idName.length == 1) { // if non-composite PK
  Field fieldId = getUtlReflection()
       .retrieveField(pEntity.getClass(), idName[0]);
  fieldId.setAccessible(true);
    String query = getHlpInsertUpdate().evalSqlInsert(
     pEntity.getClass().getSimpleName().toUpperCase(), columnsValues);
    recordSet = getSrvDatabase().retrieveRecords(query
     + " returning " + idName[0].toUpperCase() + ";\n");
    recordSet.moveToFirst();
 long result = getSrvDatabase().executeInsert(
  pEntity.getClass().getSimpleName().toUpperCase(), columnsValues);
 if (result != 1) {
  String query = getHlpInsertUpdate().evalSqlInsert(pEntity.getClass()
   .getSimpleName().toUpperCase(), columnsValues);
  throw new ExceptionWithCode(ISrvDatabase.ERROR_INSERT_UPDATE,
origin: org.beigesoft/beigesoft-webcrud-jar

/**
 * <p>Instantiate ORM  service.</p>
 * @return SrvOrmPostgresql - ORM  service
 */
@Override
public final synchronized SrvOrmPostgresql<ResultSet> instantiateSrvOrm() {
 return new SrvOrmPostgresql<ResultSet>();
}
org.beigesoft.orm.serviceSrvOrmPostgresql

Javadoc

ORM service with RDBMS specific INSERT implementation. Insert must fill ID for entities that have autogenerated ID.

Most used methods

  • <init>
  • getHlpInsertUpdate
  • getSrvDatabase
  • getUtlReflection
  • evalColumnsValues
  • evalColumnsValuesAndFillNewVersion
  • getSrvRecordRetriever

Popular in Java

  • Making http requests using okhttp
  • setRequestProperty (URLConnection)
  • getSupportFragmentManager (FragmentActivity)
    Return the FragmentManager for interacting with fragments associated with this activity.
  • onCreateOptionsMenu (Activity)
  • BufferedReader (java.io)
    Reads text from a character-input stream, buffering characters so as to provide for the efficient re
  • RandomAccessFile (java.io)
    Allows reading from and writing to a file in a random-access manner. This is different from the uni-
  • ServerSocket (java.net)
    This class represents a server-side socket that waits for incoming client connections. A ServerSocke
  • URLConnection (java.net)
    The abstract class URLConnection is the superclass of all classes that represent a communications li
  • JFrame (javax.swing)
  • Runner (org.openjdk.jmh.runner)
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now