Example #1
0
 private void ValidateProperties(DBProperties dbProperties)
 {
     String userName = dbProperties.GetUserName();
     String password = dbProperties.GetPassword();
     String ip = dbProperties.GetIp();
     int port = dbProperties.GetPort();
     if (userName == null)
     {
         throw new PlanckDBException(CommandStatus.userNameIsNull);
     }
     if (password == null)
     {
         throw new PlanckDBException(CommandStatus.passwordIsNull);
     }
     if (ip == null)
     {
         throw new PlanckDBException(CommandStatus.ipIsNull);
     }
     if (port < 0)
     {
         throw new PlanckDBException(CommandStatus.notValidPortNumber);
     }
 }