Package org.apache.isis.applib.value

Examples of org.apache.isis.applib.value.TimeStamp


                will(returnValue(null));
            }
        });

        TestClock.initialize();
        timestamp = new TimeStamp(0);
        holder = new FacetHolderImpl();
        setValue(adapter = new TimeStampValueSemanticsProvider(holder, mockConfiguration, mockContext));
    }
View Full Code Here


        throw new InvalidEntryException("Can't change a timestamp.");
    }

    @Override
    protected TimeStamp setDate(final Date date) {
        return new TimeStamp(date.getTime());
    }
View Full Code Here

        this.dataType = dataType;
    }

    @Override
    protected Object preparedStatementObject(final ObjectAdapter value) {
        final TimeStamp asDate = (TimeStamp) value.getObject();
        final java.sql.Timestamp timeStamp = new java.sql.Timestamp(asDate.longValue());
        return timeStamp;
    }
View Full Code Here

        ObjectAdapter restoredValue;
        final Class<?> correspondingClass = field.getSpecification().getCorrespondingClass();
        if (correspondingClass == TimeStamp.class) {
            final java.sql.Timestamp o = (java.sql.Timestamp) results.getObject(columnName);
            final TimeStamp timeValue = new TimeStamp(o.getTime());
            restoredValue = IsisContext.getPersistenceSession().getAdapterManager().adapterFor(timeValue);
        } else {
            throw new PersistFailedException("Unhandled time type: " + correspondingClass.getCanonicalName());
        }
        return restoredValue;
View Full Code Here

                will(returnValue(null));
            }
        });

        TestClock.initialize();
        timestamp = new TimeStamp(0);
        holder = new FacetHolderImpl();
        setValue(adapter = new TimeStampValueSemanticsProvider(holder, mockConfiguration, mockContext));
    }
View Full Code Here

        throw new InvalidEntryException("Can't change a timestamp.");
    }

    @Override
    protected TimeStamp setDate(final Date date) {
        return new TimeStamp(date.getTime());
    }
View Full Code Here

                will(returnValue(null));
            }
        });

        TestClock.initialize();
        timestamp = new TimeStamp(0);
        holder = new FacetHolderImpl();
        setValue(adapter = new TimeStampValueSemanticsProvider(holder, mockConfiguration, mockContext));
    }
View Full Code Here

        this.dataType = dataType;
    }

    @Override
    protected Object preparedStatementObject(final ObjectAdapter value) {
        final TimeStamp asDate = (TimeStamp) value.getObject();
        final java.sql.Timestamp timeStamp = new java.sql.Timestamp(asDate.longValue());
        return timeStamp;
    }
View Full Code Here

        allowing(mockConfiguration).getString("isis.value.format.timestamp");
        will(returnValue(null));
      }});

        TestClock.initialize();
        timestamp = new TimeStamp(0);
        holder = new FacetHolderImpl();
        setValue(adapter = new TimeStampValueSemanticsProvider(holder, mockConfiguration, mockContext));
    }
View Full Code Here

        super(field);
    }

    @Override
    protected Object preparedStatementObject(final ObjectAdapter value) {
        final TimeStamp asDate = (TimeStamp) value.getObject();
        final java.sql.Timestamp timeStamp = new java.sql.Timestamp(asDate.longValue());
        return timeStamp;
    }
View Full Code Here

TOP

Related Classes of org.apache.isis.applib.value.TimeStamp

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.