Package com.baasbox.dao.exception

Examples of com.baasbox.dao.exception.InvalidModelException


  }
 

  public void checkModelDocument(ODocument doc) throws InvalidModelException {
    if (doc!=null && !doc.getClassName().equalsIgnoreCase(this.MODEL_NAME))
      throw new InvalidModelException();
  }
View Full Code Here


    if (!(doc instanceof ODocument)) throw new IllegalArgumentException(rid +" is a rid not referencing a valid Document");
    try{
      checkModelDocument((ODocument)doc);
    }catch(InvalidModelException e){
      //the rid may reference a ORecordBytes which is not a ODocument
      throw new InvalidModelException("the rid " + rid + " is not valid belong to the collection " + this.MODEL_NAME);
    }
    if (Logger.isTraceEnabled()) Logger.trace("Method End");
    return (ODocument)doc;
  }
View Full Code Here

    if(existingUser!=null){
      String username = null;
      try {
        username = UserService.getUsernameByProfile(existingUser);
        if(username==null){
          throw new InvalidModelException("username for profile is null");
        }
      } catch (InvalidModelException e) {
        internalServerError("unable to login with "+socialNetwork+" : "+e.getMessage());
      }
     
View Full Code Here

    ODocument doc=listOfFiles.get(0);
    try{
      checkModelDocument((ODocument)doc);
    }catch(InvalidModelException e){
      //the id may reference a ORecordBytes which is not a ODocument
      throw new InvalidModelException("the id " + id + " is not a file " + this.MODEL_NAME);
    }
    return doc;
 
View Full Code Here

TOP

Related Classes of com.baasbox.dao.exception.InvalidModelException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.