Package org.dspace.storage.rdbms

Examples of org.dspace.storage.rdbms.TableRow


        try
        {
            while (tri.hasNext())
            {
                TableRow row = tri.next();

                // first check the cache (FIXME: is this right?)
                ResourcePolicy cachepolicy = (ResourcePolicy) c.fromCache(
                        ResourcePolicy.class, row.getIntColumn("policy_id"));

                if (cachepolicy != null)
                {
                    policies.add(cachepolicy);
                }
View Full Code Here


        try
        {

            while (tri.hasNext())
            {
                TableRow row = tri.next();

                // first check the cache (FIXME: is this right?)
                ResourcePolicy cachepolicy = (ResourcePolicy) c.fromCache(
                        ResourcePolicy.class, row.getIntColumn("policy_id"));

                ResourcePolicy myPolicy = null;

                if (cachepolicy != null)
                {
View Full Code Here

        // Grab rows from DB
        TableRowIterator tri = DatabaseManager.queryTable(context, "MetadataValue",
                "SELECT * FROM MetadataValue where metadata_value_id= ? ",
                valueId);

        TableRow row = null;
        try
        {
            if (tri.hasNext())
            {
                row = tri.next();
View Full Code Here

        // Grab rows from DB
        TableRowIterator tri = DatabaseManager.queryTable(context, "MetadataValue",
                "SELECT * FROM MetadataValue WHERE metadata_field_id= ? ",
                fieldId);

        TableRow row = null;
        java.util.Collection ret = new ArrayList();
        try
        {
            while (tri.hasNext())
            {
View Full Code Here

    private int nextByRowID()
      throws SQLException
    {
      if (itemRows.hasNext())
        {
            TableRow row = itemRows.next();
            return row.getIntColumn("item_id");
        }
        else
        {
            return -1;
        }
View Full Code Here

      throws SQLException
    {
      if (itemRows.hasNext())
        {
            // Convert the row into an Item object
            TableRow row = itemRows.next();

            // Check cache
            Item fromCache = (Item) ourContext.fromCache(Item.class, row
                    .getIntColumn("item_id"));

            if (fromCache != null)
            {
                return fromCache;
View Full Code Here

        {
            query.append(" AND item_id IN ( " +
                         typeQuery + ") ");
        }
       
        TableRow row = DatabaseManager.querySingle(context, query.toString());

        Integer numItems;
        if (oracle)
        {
            numItems = new Integer(row.getIntColumn("num"));
        }
        else
        {
            // for some reason the number column is of "long" data type!
            Long count = new Long(row.getLongColumn("num"));
            numItems = new Integer(count.intValue());
        }
        return numItems;
    }
View Full Code Here

        if (fromCache != null)
        {
            return fromCache;
        }

        TableRow row = DatabaseManager.find(context, "workspaceitem", id);

        if (row == null)
        {
            if (log.isDebugEnabled())
            {
View Full Code Here

        }

        i.update();

        // Create the workspace item row
        TableRow row = DatabaseManager.create(c, "workspaceitem");

        row.setColumn("item_id", i.getID());
        row.setColumn("collection_id", coll.getID());

        log.info(LogManager.getHeader(c, "create_workspace_item",
                "workspace_item_id=" + row.getIntColumn("workspace_item_id")
                        + "item_id=" + i.getID() + "collection_id="
                        + coll.getID()));

        DatabaseManager.update(c, row);
View Full Code Here

        try
        {
            while (tri.hasNext())
            {
                TableRow row = tri.next();

                // Check the cache
                WorkspaceItem wi = (WorkspaceItem) context.fromCache(
                        WorkspaceItem.class, row.getIntColumn("workspace_item_id"));

                if (wi == null)
                {
                    wi = new WorkspaceItem(context, row);
                }
View Full Code Here

TOP

Related Classes of org.dspace.storage.rdbms.TableRow

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.