Package org.syrup.helpers

Examples of org.syrup.helpers.EndPoint


    public void set_in_1(Data data, SyrupConnection con) throws Exception
    {
        try
        {
            EndPoint p = sqlImpl().queryFunctions().readOutEndPoint("1", false, con);
            if (p.data != null)
            {
                throw new Exception("in1 is filled");
            }
            sqlImpl().updateFunctions().updateOutLink("1", false, data, con);
View Full Code Here


     */
    public void set_in_2(Data data, SyrupConnection con) throws Exception
    {
        try
        {
            EndPoint p = sqlImpl().queryFunctions().readOutEndPoint("1", true, con);
            if (p.data != null)
            {
                throw new Exception("in2 is filled");
            }
            sqlImpl().updateFunctions().updateOutLink("1", true, data, con);
View Full Code Here

     */
    public Data get_out_1(SyrupConnection con) throws Exception
    {
        try
        {
            EndPoint p = sqlImpl().queryFunctions().readInEndPoint("1", false, con);
            if (p.data != null)
            {
                sqlImpl().updateFunctions().updateInLink("1", false, null, con);
                sqlImpl().loggingFunctions().log("1", LogEntry.EVENT
                    | LogEntry.OUT_1, con);
View Full Code Here

     */
    public Data get_out_2(SyrupConnection con) throws Exception
    {
        try
        {
            EndPoint p = sqlImpl().queryFunctions().readInEndPoint("1", true, con);
            if (p.data != null)
            {
                sqlImpl().updateFunctions().updateInLink("1", true, null, con);
                sqlImpl().loggingFunctions().log("1", LogEntry.EVENT
                    | LogEntry.OUT_2, con);
View Full Code Here

     * @return The in/out EndPoint of a PTask.
     */
    protected EndPoint readTargetEndPoint(String st, String key, boolean port,
        SyrupConnection con) throws Exception
    {
        EndPoint endp = null;
        PreparedStatement s = null;
        ResultSet r = null;
       
        try
        {
            s = con.prepareStatementFromCache(st);
            s.setString(1, key);
            s.setBoolean(2, port);
            r = s.executeQuery();

            if (r.next())
            {
                endp = new EndPoint(readPTask(r.getString("task"), con), r.getBoolean("port"), readData(r, "data"));
            }
        }
        finally
        {
            sqlImpl().genericFunctions().close(r);
View Full Code Here

     *            The SyrupConnection over which SQL statements are executed.
     * @return The Context of a PTask.
     */
    protected Context readContext(PTask p, SyrupConnection con) throws Exception
    {
        EndPoint in_1 = readInEndPoint(p.key(), false, con);
        EndPoint in_2 = readInEndPoint(p.key(), true, con);

        EndPoint out_1 = readOutEndPoint(p.key(), false, con);
        EndPoint out_2 = readOutEndPoint(p.key(), true, con);

        // [TODO: check if it is necessary to read it again, or can we take the
        // given parameter p?]
        PTask self = readPTask(p.key(), con);

View Full Code Here

TOP

Related Classes of org.syrup.helpers.EndPoint

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.