org.midao.jdbc.core.utils
Class AssertUtils

java.lang.Object
  extended by org.midao.jdbc.core.utils.AssertUtils

public class AssertUtils
extends java.lang.Object

Assert Utils class. Allows throwing exception is input value is nill. Useful in cases when function cannot accept some it parameters as null


Constructor Summary
AssertUtils()
           
 
Method Summary
static void assertNotNull(java.lang.Object value)
          Throws exception if value is null
static void assertNotNull(java.lang.Object value, java.sql.SQLException exception)
          Throws exception if value is null.
static void assertNotNull(java.lang.Object value, java.lang.String message)
          Throws exception if value is null.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AssertUtils

public AssertUtils()
Method Detail

assertNotNull

public static void assertNotNull(java.lang.Object value)
Throws exception if value is null

Parameters:
value - value which would be checked

assertNotNull

public static void assertNotNull(java.lang.Object value,
                                 java.lang.String message)
Throws exception if value is null.

Parameters:
value - values which would be checked
message - message which would be added to exception

assertNotNull

public static void assertNotNull(java.lang.Object value,
                                 java.sql.SQLException exception)
                          throws java.sql.SQLException
Throws exception if value is null.

Parameters:
value - values which would be checked
exception - Exception which would be thrown if value == null
Throws:
java.sql.SQLException


Copyright © 2013. All Rights Reserved.