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

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

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

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
List l =
  • Codota Iconnew LinkedList()
  • Codota IconCollections.emptyList()
  • Codota Iconnew ArrayList()
  • 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.typesPGShortcastToServerType

Popular methods of PGShort

  • <init>

Popular in Java

  • Making http requests using okhttp
  • startActivity (Activity)
  • getResourceAsStream (ClassLoader)
    Returns a stream for the resource with the specified name. See #getResource(String) for a descriptio
  • getOriginalFilename (MultipartFile)
    Return the original filename in the client's filesystem.This may contain path information depending
  • Container (java.awt)
    A generic Abstract Window Toolkit(AWT) container object is a component that can contain other AWT co
  • Socket (java.net)
    Provides a client-side TCP socket.
  • NoSuchElementException (java.util)
    Thrown when trying to retrieve an element past the end of an Enumeration or Iterator.
  • Properties (java.util)
    The Properties class represents a persistent set of properties. The Properties can be saved to a st
  • TreeSet (java.util)
    A NavigableSet implementation based on a TreeMap. The elements are ordered using their Comparable, o
  • Semaphore (java.util.concurrent)
    A counting semaphore. Conceptually, a semaphore maintains a set of permits. Each #acquire blocks if
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