Codota Logo
PGBoolean.castToServerType
Code IndexAdd Codota to your IDE (free)

How to use
castToServerType
method
in
org.postgresql.core.types.PGBoolean

Best Java code snippets using org.postgresql.core.types.PGBoolean.castToServerType (Showing top 3 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
Point p =
  • Codota Iconnew Point(x, y)
  • Codota Iconnew Point()
  • Codota IconMouseEvent e;e.getPoint()
  • Smart code suggestions by Codota
}
origin: postgresql/postgresql

private PGType createInternalType( Object x, int targetType ) throws PSQLException
{
  if ( x instanceof Byte ) return PGByte.castToServerType((Byte)x, targetType );
  if ( x instanceof Short ) return PGShort.castToServerType((Short)x, targetType );
  if ( x instanceof Integer ) return PGInteger.castToServerType((Integer)x, targetType );
  if ( x instanceof Long ) return PGLong.castToServerType((Long)x, targetType );
  if ( x instanceof Double ) return PGDouble.castToServerType((Double)x, targetType );
  if ( x instanceof Float ) return PGFloat.castToServerType((Float)x, targetType );
  if ( x instanceof BigDecimal) return PGBigDecimal.castToServerType((BigDecimal)x, targetType );
  // since all of the above are instances of Number make sure this is after them
  if ( x instanceof Number ) return PGNumber.castToServerType((Number)x, targetType );
  if ( x instanceof Boolean) return PGBoolean.castToServerType((Boolean)x, targetType );
  return new PGUnknown(x);
  
}
// Helper method for setting parameters to PGobject subclasses.
origin: org.ancoron.postgresql/org.postgresql

private PGType createInternalType( Object x, int targetType ) throws PSQLException
{
  if ( x instanceof Byte ) return PGByte.castToServerType((Byte)x, targetType );
  if ( x instanceof Short ) return PGShort.castToServerType((Short)x, targetType );
  if ( x instanceof Integer ) return PGInteger.castToServerType((Integer)x, targetType );
  if ( x instanceof Long ) return PGLong.castToServerType((Long)x, targetType );
  if ( x instanceof Double ) return PGDouble.castToServerType((Double)x, targetType );
  if ( x instanceof Float ) return PGFloat.castToServerType((Float)x, targetType );
  if ( x instanceof BigDecimal) return PGBigDecimal.castToServerType((BigDecimal)x, targetType );
  // since all of the above are instances of Number make sure this is after them
  if ( x instanceof Number ) return PGNumber.castToServerType((Number)x, targetType );
  if ( x instanceof Boolean) return PGBoolean.castToServerType((Boolean)x, targetType );
  return new PGUnknown(x);
  
}
// Helper method for setting parameters to PGobject subclasses.
origin: org.ancoron.postgresql/org.postgresql.osgi

private PGType createInternalType( Object x, int targetType ) throws PSQLException
{
  if ( x instanceof Byte ) return PGByte.castToServerType((Byte)x, targetType );
  if ( x instanceof Short ) return PGShort.castToServerType((Short)x, targetType );
  if ( x instanceof Integer ) return PGInteger.castToServerType((Integer)x, targetType );
  if ( x instanceof Long ) return PGLong.castToServerType((Long)x, targetType );
  if ( x instanceof Double ) return PGDouble.castToServerType((Double)x, targetType );
  if ( x instanceof Float ) return PGFloat.castToServerType((Float)x, targetType );
  if ( x instanceof BigDecimal) return PGBigDecimal.castToServerType((BigDecimal)x, targetType );
  // since all of the above are instances of Number make sure this is after them
  if ( x instanceof Number ) return PGNumber.castToServerType((Number)x, targetType );
  if ( x instanceof Boolean) return PGBoolean.castToServerType((Boolean)x, targetType );
  return new PGUnknown(x);
  
}
// Helper method for setting parameters to PGobject subclasses.
org.postgresql.core.typesPGBooleancastToServerType

Popular methods of PGBoolean

  • <init>

Popular in Java

  • Reading from database using SQL prepared statement
  • getSystemService (Context)
  • getSharedPreferences (Context)
  • getApplicationContext (Context)
  • Kernel (java.awt.image)
  • BufferedReader (java.io)
    Reads text from a character-input stream, buffering characters so as to provide for the efficient re
  • FileOutputStream (java.io)
    A file output stream is an output stream for writing data to aFile or to a FileDescriptor. Whether
  • OutputStream (java.io)
    A writable sink for bytes.Most clients will use output streams that write data to the file system (
  • TreeMap (java.util)
    A Red-Black tree based NavigableMap implementation. The map is sorted according to the Comparable of
  • BasicDataSource (org.apache.commons.dbcp)
    Basic implementation of javax.sql.DataSource that is configured via JavaBeans properties. This is no
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