Subversion Repositories SmartDukaan

Rev

Rev 3374 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
3374 rajveer 1
namespace java in.shop2020.generic
2
namespace py shop2020.thriftpy.generic
3
 
4496 mandeep.dh 4
enum ExceptionType {
5
    NULL_POINTER = 101,
6
    ILLEGAL_ARGUMENTS = 102,
7
    DATABASE_ERROR = 103,
8
    NOT_AUTHORIZED = 104
9
}
10
 
11
const map<ExceptionType, string> EXCEPTION_TYPES_DESCRIPTION = {
12
    ExceptionType.NULL_POINTER : "Null pointer exception",
13
    ExceptionType.ILLEGAL_ARGUMENTS : "Illegal arguments, could not lookup",
14
    ExceptionType.DATABASE_ERROR : "Error in the DB layer",
15
    ExceptionType.NOT_AUTHORIZED : "Not authorized"
16
};
17
 
3374 rajveer 18
service GenericService{
19
	/**
20
	* For checking weather service is active alive or not. It also checks connectivity with database
21
	*/
22
	bool isAlive(),
23
 
24
	/**
25
	* For closing the open session in sqlalchemy
26
	*/
27
	void closeSession()
4496 mandeep.dh 28
}