Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
SIX OVAL - http://code.google.com/p/six-oval/ Copyright (C) 2010 National Institute of Advanced Industrial Science and Technology (AIST) Registration Number: H22PRO-1124 Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
package jp.go.aist.six.oval.core.repository.morphia.results;

Author(s):
Akihito Nakamura, AIST
Version:
$Id: OvalResultsDAO.java 3110 2013-04-26 10:41:44Z nakamura5akihito@gmail.com $
public class OvalResultsDAO
    extends BaseDAO<OvalResultsString>
{

    
    public OvalResultsDAO(
                    final Datastore ds
                    )
    {
        superOvalResults.classds );
    }
    //*********************************************************************
    //  DAO
    //*********************************************************************
    @Override
    public Key<OvalResultssave(
                    final OvalResults oval_results
                    )
    {
        String  pid = oval_results.getPersistentID();
        if (pid == null) {
            pid = UUID.randomUUID().toString();
            oval_results.setPersistentIDpid );
        }
        //oval_definitions
        OvalDefinitions  oval_definitions = oval_results.getOvalDefinitions();
        if (oval_definitions != null) {
            DAO<OvalDefinitionsString>  defs_dao = _getForwardingDAOOvalDefinitions.class );
            defs_dao.saveoval_definitions );
        }
        //oval_system_characteristics
        ResultsType  results = oval_results.getResults();
        if (results != null) {
            Collection<SystemTypesystems = results.getSystem();
            if (systems != null) {
                DAO<OvalSystemCharacteristicsString>  sc_dao = _getForwardingDAOOvalSystemCharacteristics.class );
                for (SystemType  s : systems) {
                    OvalSystemCharacteristics  oval_sc = s.getOvalSystemCharacteristics();
                    sc_dao.saveoval_sc );
                }
            }
        }
        return super.saveoval_results );
    }
//
New to GrepCode? Check out our FAQ X