Exemple #1
0
//JAVA TO C# CONVERTER WARNING: 'final' parameters are not available in .NET:
//ORIGINAL LINE: @Override public boolean equals(final Object obj)
        public override bool Equals(object obj)
        {
//JAVA TO C# CONVERTER WARNING: The original Java variable was marked 'final':
//ORIGINAL LINE: final EmbeddableCompoundId other = (EmbeddableCompoundId) obj;
            EmbeddableCompoundId other = (EmbeddableCompoundId)obj;

            return(idPart1 == other.idPart1 && idPart2.Equals(idPart2));
        }
Exemple #2
0
        public virtual void setupIllegalJPAEntities()
        {
            EntityManager manager = entityManagerFactory.createEntityManager();

            manager.Transaction.begin();

            compoundIdJPAEntity = new CompoundIdJPAEntity();
            EmbeddableCompoundId id = new EmbeddableCompoundId();

            id.IdPart1             = 123L;
            id.IdPart2             = "part2";
            compoundIdJPAEntity.Id = id;
            manager.persist(compoundIdJPAEntity);

            manager.flush();
            manager.Transaction.commit();
            manager.close();
        }