/* * To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools | Templates * and open the template in the editor. */ package com.ryuuji.api; import java.util.Date; import javax.jws.WebService; import javax.jws.WebMethod; import javax.jws.WebParam; import logica.ExNihilo; import orm.Actividad; import orm.Anotacion; import orm.Apoderado; import orm.Asignatura; import orm.Asistencia; import orm.Colegio; import orm.Curso; import orm.Estudiante; import orm.Nota; import orm.Profesor; /** * * @author ryuuji */ @WebService(serviceName = "ColegioApiServic3e") public class ExNihiloService { //Colegio @WebMethod(operationName = "crearColegio") public boolean crearColegio(@WebParam(name = "nombre") String nombre) { return ExNihilo.crearColegio(nombre); } @WebMethod(operationName = "modificarColegio") public boolean modificarColegio(@WebParam(name = "colegio") Colegio colegio, @WebParam(name = "nombre") String nombre) { return ExNihilo.modificarColegio(colegio, nombre); } @WebMethod(operationName = "eliminarColegio") public boolean eliminarColegio(@WebParam(name = "colegio") Colegio colegio) { return ExNihilo.eliminarColegio(colegio); } //Curso @WebMethod(operationName = "crearCurso") public boolean crearCurso(@WebParam(name = "nivel") int nivel, @WebParam(name = "letra") String letra, @WebParam(name = "colegio") Colegio colegio) { return ExNihilo.crearCurso(nivel, letra, colegio); } @WebMethod(operationName = "modificarCurso") public boolean modificarCurso(@WebParam(name = "curso") Curso curso, @WebParam(name = "nivel") Integer nivel, @WebParam(name = "letra") String letra, @WebParam(name = "Colegio") Colegio Colegio) { return ExNihilo.modificarCurso(curso, nivel, letra, Colegio); } @WebMethod(operationName = "eliminarCurso") public boolean eliminarCurso(@WebParam(name = "curso") Curso curso) { return ExNihilo.eliminarCurso(curso); } //Apoderado @WebMethod(operationName = "crearApoderado") public boolean crearApoderado(@WebParam(name = "colegio") Colegio colegio, @WebParam(name = "nombre") String nombre, @WebParam(name = "rut") String rut) { return ExNihilo.crearApoderado(colegio, nombre, rut); } @WebMethod(operationName = "modificarApoderado") public boolean modificarApoderado(@WebParam(name = "apoderado") Apoderado apoderado, @WebParam(name = "nombre") String nombre, @WebParam(name = "rut") String rut) { return ExNihilo.modificarApoderado(apoderado, nombre, rut); } @WebMethod(operationName = "eliminarApoderado") public boolean eliminarApoderado(@WebParam(name = "apoderado") Apoderado apoderado) { return ExNihilo.eliminarApoderado(apoderado); } //Estudiante @WebMethod(operationName = "crearEstudiante") public boolean crearEstudiante(@WebParam(name = "nombre") String nombre, @WebParam(name = "rut") String rut, @WebParam(name = "curso") Curso curso, @WebParam(name = "apoderado") Apoderado apoderado) { return ExNihilo.crearEstudiante(nombre, rut, curso, apoderado); } @WebMethod(operationName = "modificarEstudiante") public boolean modificarEstudiante(@WebParam(name = "estudiante") Estudiante estudiante, @WebParam(name = "nombre") String nombre, @WebParam(name = "rut") String rut, @WebParam(name = "curso") Curso curso, @WebParam(name = "apoderado") Apoderado apoderado) { return ExNihilo.modificarEstudiante(estudiante, nombre, rut, curso, apoderado); } @WebMethod(operationName = "eliminarEstudiante") public boolean eliminarEstudiante(@WebParam(name = "estudiante") Estudiante estudiante) { return ExNihilo.eliminarEstudiante(estudiante); } //Asistencia @WebMethod(operationName = "crearAsistencia") public boolean crearAsistencia(@WebParam(name = "dia") Date dia, @WebParam(name = "asistio") boolean asistio, @WebParam(name = "estudiante") Estudiante estudiante) { return ExNihilo.crearAsistencia(dia, asistio, estudiante); } @WebMethod(operationName = "modificarAsistencia") public boolean modificarAsistencia(@WebParam(name = "asistencia") Asistencia asistencia, @WebParam(name = "dia") Date dia, @WebParam(name = "asistio") Boolean asistio, @WebParam(name = "estudiante") Estudiante estudiante) { return ExNihilo.modificarAsistencia(asistencia, dia, asistio, estudiante); } @WebMethod(operationName = "eliminarAsistencia") public boolean eliminarAsistencia(@WebParam(name = "asistencia") Asistencia asistencia) { return ExNihilo.eliminarAsistencia(asistencia); } //Nota @WebMethod(operationName = "crearNota") public boolean crearNota(@WebParam(name = "valor") double valor, @WebParam(name = "asignatura") Asignatura asignatura, @WebParam(name = "estudiante") Estudiante estudiante) { return ExNihilo.crearNota(valor, asignatura, estudiante); } @WebMethod(operationName = "modificarNota") public boolean modificarNota(@WebParam(name = "nota") Nota nota, @WebParam(name = "valor") Double valor, @WebParam(name = "asignatura") Asignatura asignatura, @WebParam(name = "estudiante") Estudiante estudiante) { return ExNihilo.modificarNota(nota, valor, asignatura, estudiante); } @WebMethod(operationName = "eliminarNota") public boolean eliminarNota(@WebParam(name = "nota") Nota nota) { return ExNihilo.eliminarNota(nota); } //Anotacion @WebMethod(operationName = "crearAnotacion") public boolean crearAnotacion(@WebParam(name = "positiva") boolean positiva, @WebParam(name = "descripcion") String descripcion, @WebParam(name = "estudiante") Estudiante estudiante, @WebParam(name = "profesor") Profesor profesor) { return ExNihilo.crearAnotacion(positiva, descripcion, estudiante, profesor); } @WebMethod(operationName = "modificarAnotacion") public boolean modificarAnotacion(@WebParam(name = "anotacion") Anotacion anotacion, @WebParam(name = "positiva") Boolean positiva, @WebParam(name = "descripcion") String descripcion, @WebParam(name = "estudiante") Estudiante estudiante, @WebParam(name = "profesor") Profesor profesor) { return ExNihilo.modificarAnotacion(anotacion, positiva, descripcion, estudiante, profesor); } @WebMethod(operationName = "eliminarAnotacion") public boolean eliminarAnotacion(@WebParam(name = "anotacion") Anotacion anotacion) { return ExNihilo.eliminarAnotacion(anotacion); } //Profesor @WebMethod(operationName = "crearProfesor") public boolean crearProfesor(@WebParam(name = "colegio") Colegio colegio, @WebParam(name = "nombre") String nombre, @WebParam(name = "rut") String rut) { return ExNihilo.crearProfesor(colegio, nombre, rut); } @WebMethod(operationName = "modificarProfesor") public boolean modificarProfesor(@WebParam(name = "profesor") Profesor profesor, @WebParam(name = "nombre") String nombre, @WebParam(name = "rut") String rut) { return ExNihilo.modificarProfesor(profesor, nombre, rut); } @WebMethod(operationName = "eliminarProfesor") public boolean eliminarProfesor(@WebParam(name = "profesor") Profesor profesor) { return ExNihilo.eliminarProfesor(profesor); } //Asignatura @WebMethod(operationName = "crearAsignatura") public boolean crearAsignatura(@WebParam(name = "nombre") String nombre, @WebParam(name = "curso") Curso curso, @WebParam(name = "profesor") Profesor profesor) { return ExNihilo.crearAsignatura(nombre, curso, profesor); } @WebMethod(operationName = "modificarAsignatura") public boolean modificarAsignatura(@WebParam(name = "asignatura") Asignatura asignatura, @WebParam(name = "nombre") String nombre, @WebParam(name = "curso") Curso curso, @WebParam(name = "profesor") Profesor profesor) { return ExNihilo.modificarAsignatura(asignatura, nombre, curso, profesor); } @WebMethod(operationName = "eliminarAsignatura") public boolean eliminarAsignatura(@WebParam(name = "asignatura") Asignatura asignatura) { return ExNihilo.eliminarAsignatura(asignatura); } //Actividad @WebMethod(operationName = "crearActividad") public boolean crearActividad(@WebParam(name = "fecha") Date fecha, @WebParam(name = "tipo") String tipo, @WebParam(name = "asignatura") Asignatura asignatura) { return ExNihilo.crearActividad(fecha, tipo, asignatura); } @WebMethod(operationName = "modificarActividad") public boolean modificarActividad(@WebParam(name = "actividad") Actividad actividad, @WebParam(name = "fecha") Date fecha, @WebParam(name = "tipo") String tipo, @WebParam(name = "asignatura") Asignatura asignatura) { return ExNihilo.modificarActividad(actividad, fecha, tipo, asignatura); } @WebMethod(operationName = "eliminarActividad") public boolean eliminarActividad(@WebParam(name = "actividad") Actividad actividad) { return ExNihilo.eliminarActividad(actividad); } @WebMethod(operationName = "fill") public boolean fill() { ExNihilo.fill(); return true; } @WebMethod(operationName = "deleteAll") public boolean deleteAll() { ExNihilo.deleteAll(); return true; } }