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

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

Best Java code snippets using org.postgresql.core.types.PGByte.castToServerType (Showing top 3 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: 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.typesPGBytecastToServerType

Popular methods of PGByte

  • <init>

Popular in Java

  • Creating JSON documents from java classes using gson
  • runOnUiThread (Activity)
  • startActivity (Activity)
  • getSharedPreferences (Context)
  • Window (java.awt)
    A Window object is a top-level window with no borders and no menubar. The default layout for a windo
  • PrintWriter (java.io)
    Prints formatted representations of objects to a text-output stream. This class implements all of th
  • BigDecimal (java.math)
    An immutable arbitrary-precision signed decimal.A value is represented by an arbitrary-precision "un
  • HttpURLConnection (java.net)
    An URLConnection for HTTP (RFC 2616 [http://tools.ietf.org/html/rfc2616]) used to send and receive d
  • List (java.util)
    A List is a collection which maintains an ordering for its elements. Every element in the List has a
  • XPath (javax.xml.xpath)
    XPath provides access to the XPath evaluation environment and expressions. Evaluation of XPath Expr
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